> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://next.developer.frame.io/camera-to-cloud/api-reference/device-asset-create/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://next.developer.frame.io/_mcp/server. # Create C2C asset POST https://api.frame.io/v2/devices/assets Content-Type: application/json Asset upload initiation specifically for C2C devices and applications. Note: This endpoint used to be `/v2/assets`, and while that endpoint will continue to function as normal, we suggest you use this one instead. Reference: https://next.developer.frame.io/camera-to-cloud/api-reference/device-asset-create ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Headers - `x-client-version` (string, optional, default: 0.0.0) — Firmware or software version of a C2C integration. Will be used to determine the correct Device Model configuration for the device when multiple are available. Must be a valid semantic version. For more on semantic versions, see here: https://semver.org/ ### Body (application/json) This endpoint expects an object. - `name` (string, optional, default: ) — The name the asset should have in Frame.io. This value does not have to match the name of the file on disk; it can be whatever you want it to be in Frame.io. Required if `is_realtime_upload` is `false`. If `is_realtime_upload` is `true`, must containa valid extension in the form of `".[ext]"`, unless `extension` is provided, in which case this field may be `null` or omitted. - `extension` (string, optional) — Required when `is_realtime_upload` is `true`, when `name` is not known at time of asset creation. If `name` is provided, must match extension of that value. Ignored when `is_realtime_upload` is `false`. When supplied, asset will be creted with `name` value of `"[new file].extension"`. - `filetype` (string, optional) — MIME type like `video/quicktime`. Many languages have built in utilities for detecting file mimetype (see Go and Python for examples). Required if `is_realtime_upload` is `true`. - `auto_version_id` (string, optional) — The asset you'd like this to be the next version of - `is_realtime_upload` (boolean, optional, default: false) — If `true`, File data for this asset is to be uploaded through the Real-time Uploads API. If `false`, File data for this asset will be uploaded through the default API. Must be `false` if `filetype` is not `file`. - `filesize` (V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaFilesize, optional) - `channel` (V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaChannel, optional) - `offset` (V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaOffset, optional) - `parts` (V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaParts, optional) ## Response ### 200 Asset create success response. When `is_realtime_asset` was set to `true` in the request, a simplified payload will be returned. - `Devices_deviceAssetCreate_Response_200` ## Errors ### 400 Bad Request Error Bad Request - `code` (integer, optional) - `errors` (list of HttpErrorErrorsItems, optional) - `message` (string, optional) ### 401 Unauthorized Error Unauthorized response - `code` (integer, optional) - `errors` (list of HttpErrorErrorsItems, optional) - `message` (string, optional) ### 404 Not Found Error Not Found response - `code` (integer, optional) - `errors` (list of HttpErrorErrorsItems, optional) - `message` (string, optional) ### 409 Conflict Error Conflict - `code` (enum, required) - Allowed values: `409` - `errors` (list of V2DevicesAssetsPostResponsesContentApplicationJsonSchemaErrorsItems, required) - `message` (enum, required) - Allowed values: `Channel Paused`, `invalid_client`, `slow_down` ### 429 Too Many Requests Error Standard frame.io API error response. - `code` (integer, optional) - `errors` (list of HttpErrorErrorsItems, optional) - `message` (string, optional) ## Types ### V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaFilesize ### V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaChannel ### V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaOffset ### V2DevicesAssetsPostRequestBodyContentApplicationJsonSchemaParts ### RealtimeAssetResponse - `id` (string, required) — The ID for this asset, can be used in places like `https://app.frame.io/player/:id` to go directly to an asset. - `name` (string, required) — Represents the name of the asset (filename). ### HttpErrorErrorsItems - `code` (integer, optional) - `detail` (string, optional) - `status` (integer, optional) - `title` (string, optional) ### V2DevicesAssetsPostResponsesContentApplicationJsonSchemaErrorsItems - `code` (enum, required) - Allowed values: `409` - `detail` (string, required) - `status` (enum, required) - Allowed values: `409` - `title` (string, required) ## Examples ### Regular Upload **Request** ```json { "body": { "filesize": 1073741824, "filetype": "video/quicktime", "is_realtime_upload": false, "name": "my-video.mov" } } ``` **SDK Code** ```typescript Regular Upload const response = await fetch('https://api.frame.io/v2/devices/assets', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'my-video.mov', filetype: 'video/quicktime', filesize: 1073741824, is_realtime_upload: false }) }); const asset = await response.json(); console.log(asset); ``` ```python Regular Upload import requests headers = { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' } data = { 'name': 'my-video.mov', 'filetype': 'video/quicktime', 'filesize': 1073741824, 'is_realtime_upload': False } response = requests.post( 'https://api.frame.io/v2/devices/assets', headers=headers, json=data ) asset = response.json() print(asset) ``` ```go Regular Upload package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/devices/assets" payload := strings.NewReader("{\n \"body\": {\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": false,\n \"name\": \"my-video.mov\"\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Regular Upload require 'uri' require 'net/http' url = URI("https://api.frame.io/v2/devices/assets") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"body\": {\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": false,\n \"name\": \"my-video.mov\"\n }\n}" response = http.request(request) puts response.read_body ``` ```java Regular Upload import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.frame.io/v2/devices/assets") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"body\": {\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": false,\n \"name\": \"my-video.mov\"\n }\n}") .asString(); ``` ```php Regular Upload request('POST', 'https://api.frame.io/v2/devices/assets', [ 'body' => '{ "body": { "filesize": 1073741824, "filetype": "video/quicktime", "is_realtime_upload": false, "name": "my-video.mov" } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Regular Upload using RestSharp; var client = new RestClient("https://api.frame.io/v2/devices/assets"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"body\": {\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": false,\n \"name\": \"my-video.mov\"\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Regular Upload import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["body": [ "filesize": 1073741824, "filetype": "video/quicktime", "is_realtime_upload": false, "name": "my-video.mov" ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/devices/assets")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Real-time Upload **Request** ```json { "body": { "extension": ".mov", "filesize": 1073741824, "filetype": "video/quicktime", "is_realtime_upload": true, "parts": 100 } } ``` **SDK Code** ```typescript Real-time Upload const response = await fetch('https://api.frame.io/v2/devices/assets', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ extension: '.mov', filetype: 'video/quicktime', filesize: 1073741824, is_realtime_upload: true, parts: 100 }) }); const asset = await response.json(); console.log(asset); ``` ```python Real-time Upload import requests headers = { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json' } data = { 'extension': '.mov', 'filetype': 'video/quicktime', 'filesize': 1073741824, 'is_realtime_upload': True, 'parts': 100 } response = requests.post( 'https://api.frame.io/v2/devices/assets', headers=headers, json=data ) asset = response.json() print(asset) ``` ```go Real-time Upload package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.frame.io/v2/devices/assets" payload := strings.NewReader("{\n \"body\": {\n \"extension\": \".mov\",\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": true,\n \"parts\": 100\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Real-time Upload require 'uri' require 'net/http' url = URI("https://api.frame.io/v2/devices/assets") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"body\": {\n \"extension\": \".mov\",\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": true,\n \"parts\": 100\n }\n}" response = http.request(request) puts response.read_body ``` ```java Real-time Upload import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.frame.io/v2/devices/assets") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"body\": {\n \"extension\": \".mov\",\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": true,\n \"parts\": 100\n }\n}") .asString(); ``` ```php Real-time Upload request('POST', 'https://api.frame.io/v2/devices/assets', [ 'body' => '{ "body": { "extension": ".mov", "filesize": 1073741824, "filetype": "video/quicktime", "is_realtime_upload": true, "parts": 100 } }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Real-time Upload using RestSharp; var client = new RestClient("https://api.frame.io/v2/devices/assets"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"body\": {\n \"extension\": \".mov\",\n \"filesize\": 1073741824,\n \"filetype\": \"video/quicktime\",\n \"is_realtime_upload\": true,\n \"parts\": 100\n }\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Real-time Upload import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = ["body": [ "extension": ".mov", "filesize": 1073741824, "filetype": "video/quicktime", "is_realtime_upload": true, "parts": 100 ]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/devices/assets")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```