> This page is for Camera to Cloud.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.staging.frame.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.staging.frame.io/_mcp/server.

# Create C2C asset

POST https://api.frame.io/v2/assets
Content-Type: application/json

**THIS ENDPOINT IS DEPRECATED**. Please use `/v2/devices/assets` instead. While this endpoint will continue to function as normal, we ask that integrations begin using the new endpoint instead for consistency with the rest of the C2C API.

Asset upload initiation specifically for C2C devices and applications.

Reference: https://developer.staging.frame.io/camera-to-cloud/api-reference/device-asset-create

## 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` (V2AssetsPostRequestBodyContentApplicationJsonSchemaFilesize, optional)
- `channel` (V2AssetsPostRequestBodyContentApplicationJsonSchemaChannel, optional)
- `offset` (V2AssetsPostRequestBodyContentApplicationJsonSchemaOffset, optional)
- `parts` (V2AssetsPostRequestBodyContentApplicationJsonSchemaParts, 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_deviceAssetCreateDeprecated_Response_200`
  - : Asset
  - RealtimeAssetCreateResponse: RealtimeAssetResponse

## 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

- `code` (enum, required)
  - Allowed values: `409`
- `errors` (list of V2AssetsPostResponsesContentApplicationJsonSchemaErrorsItems, 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

### V2AssetsPostRequestBodyContentApplicationJsonSchemaFilesize

- string
- integer

### V2AssetsPostRequestBodyContentApplicationJsonSchemaChannel

- string
- integer

### V2AssetsPostRequestBodyContentApplicationJsonSchemaOffset

- string
- integer

### V2AssetsPostRequestBodyContentApplicationJsonSchemaParts

- string
- integer

### Asset

Accepts arbitrary key/value pairs for storing information on an asset

- Asset0

### 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)

### V2AssetsPostResponsesContentApplicationJsonSchemaErrorsItems

- `code` (enum, required)
  - Allowed values: `409`
- `detail` (string, required)
- `status` (enum, required)
  - Allowed values: `409`
- `title` (string, required)

### Asset0

- `` (string, optional)

## Examples

### Regular upload as new version of existing asset

**Request**

```json
{
  "name": "my_video_v2.mov",
  "filetype": "video/quicktime",
  "auto_version_id": "4386e276-6317-4d8d-b82c-8a16df9b66d2",
  "is_realtime_upload": false,
  "filesize": 1073741824
}
```

**Response**

```json
{
  "account_id": "string",
  "archive_from": "2024-01-15T09:30:00Z",
  "archive_scheduled_at": "2024-01-15T09:30:00Z",
  "archive_status": "string",
  "archived_at": "2024-01-15T09:30:00Z",
  "asset_type": "document",
  "bundle": true,
  "bundle_view": "string",
  "cover_asset_id": "string",
  "creator": {
    "digest_frequency": "string",
    "image_32": "string",
    "image_128": "string",
    "from_google": true,
    "mfa_enforced_at": "string",
    "email": "string",
    "name": "string",
    "image_64": "string",
    "timezone_value": "string",
    "account_id": "string",
    "updated_at": "string",
    "image_256": "string",
    "_type": "string",
    "user_hash": "string",
    "upload_url": "string",
    "profile_image": "string",
    "first_login_at": "string",
    "joined_via": "string",
    "id": "string",
    "next_digest_date": "string",
    "last_seen": "string",
    "inserted_at": "string",
    "roles": {
      "admin": true,
      "id": "string",
      "sales": true,
      "support": true
    },
    "user_default_color": "string"
  },
  "frames": 1,
  "hard_deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "index": 1.1,
  "is_bundle_child": true,
  "is_hls_required": true,
  "is_session_watermarked": true,
  "item_count": 1,
  "label": "string",
  "metadata": {},
  "metadata_flags": {
    "id": "string",
    "is_360": true,
    "is_hdr": true,
    "is_original_player_compatible": true
  },
  "name": "string",
  "original": "string",
  "parent_asset_id": "string",
  "project_id": "string",
  "properties": {
    "": "string"
  },
  "required_transcodes": {
    "cover": true,
    "finalized": [
      "thumb"
    ],
    "h264_1080_best": true,
    "h264_2160": true,
    "h264_360": true,
    "h264_540": true,
    "h264_720": true,
    "image_full": true,
    "image_high": true,
    "page_proxy": true,
    "thumb": true,
    "thumb_540": true,
    "thumb_orig_ar_540": true,
    "thumb_scrub": true
  },
  "team_id": "string",
  "user_permissions": {
    "can_download": true,
    "can_modify_template": true,
    "can_public_share_presentation": true,
    "can_public_share_review_link": true,
    "can_share_downloadable_presentation": true,
    "can_share_downloadable_review_link": true,
    "can_share_unwatermarked_presentation": true,
    "can_share_unwatermarked_review_link": true
  },
  "type": "file",
  "view_count": 1
}
```

**SDK Code**

```python Regular upload as new version of existing asset
import requests

url = "https://api.frame.io/v2/assets"

payload = {
    "name": "my_video_v2.mov",
    "filetype": "video/quicktime",
    "auto_version_id": "4386e276-6317-4d8d-b82c-8a16df9b66d2",
    "is_realtime_upload": False,
    "filesize": 1073741824
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Regular upload as new version of existing asset
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"name":"my_video_v2.mov","filetype":"video/quicktime","auto_version_id":"4386e276-6317-4d8d-b82c-8a16df9b66d2","is_realtime_upload":false,"filesize":1073741824}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Regular upload as new version of existing asset
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v2/assets"

	payload := strings.NewReader("{\n  \"name\": \"my_video_v2.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"auto_version_id\": \"4386e276-6317-4d8d-b82c-8a16df9b66d2\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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 as new version of existing asset
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/assets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"my_video_v2.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"auto_version_id\": \"4386e276-6317-4d8d-b82c-8a16df9b66d2\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}"

response = http.request(request)
puts response.read_body
```

```java Regular upload as new version of existing asset
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"my_video_v2.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"auto_version_id\": \"4386e276-6317-4d8d-b82c-8a16df9b66d2\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}")
  .asString();
```

```php Regular upload as new version of existing asset
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/assets', [
  'body' => '{
  "name": "my_video_v2.mov",
  "filetype": "video/quicktime",
  "auto_version_id": "4386e276-6317-4d8d-b82c-8a16df9b66d2",
  "is_realtime_upload": false,
  "filesize": 1073741824
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Regular upload as new version of existing asset
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"my_video_v2.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"auto_version_id\": \"4386e276-6317-4d8d-b82c-8a16df9b66d2\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Regular upload as new version of existing asset
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "name": "my_video_v2.mov",
  "filetype": "video/quicktime",
  "auto_version_id": "4386e276-6317-4d8d-b82c-8a16df9b66d2",
  "is_realtime_upload": false,
  "filesize": 1073741824
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/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 with known filename

**Request**

```json
{
  "name": "my_video.mp4",
  "filetype": "video/mp4",
  "is_realtime_upload": true,
  "filesize": 1073741824,
  "channel": 0,
  "offset": -10,
  "parts": 100
}
```

**Response**

```json
{
  "account_id": "string",
  "archive_from": "2024-01-15T09:30:00Z",
  "archive_scheduled_at": "2024-01-15T09:30:00Z",
  "archive_status": "string",
  "archived_at": "2024-01-15T09:30:00Z",
  "asset_type": "document",
  "bundle": true,
  "bundle_view": "string",
  "cover_asset_id": "string",
  "creator": {
    "digest_frequency": "string",
    "image_32": "string",
    "image_128": "string",
    "from_google": true,
    "mfa_enforced_at": "string",
    "email": "string",
    "name": "string",
    "image_64": "string",
    "timezone_value": "string",
    "account_id": "string",
    "updated_at": "string",
    "image_256": "string",
    "_type": "string",
    "user_hash": "string",
    "upload_url": "string",
    "profile_image": "string",
    "first_login_at": "string",
    "joined_via": "string",
    "id": "string",
    "next_digest_date": "string",
    "last_seen": "string",
    "inserted_at": "string",
    "roles": {
      "admin": true,
      "id": "string",
      "sales": true,
      "support": true
    },
    "user_default_color": "string"
  },
  "frames": 1,
  "hard_deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "index": 1.1,
  "is_bundle_child": true,
  "is_hls_required": true,
  "is_session_watermarked": true,
  "item_count": 1,
  "label": "string",
  "metadata": {},
  "metadata_flags": {
    "id": "string",
    "is_360": true,
    "is_hdr": true,
    "is_original_player_compatible": true
  },
  "name": "string",
  "original": "string",
  "parent_asset_id": "string",
  "project_id": "string",
  "properties": {
    "": "string"
  },
  "required_transcodes": {
    "cover": true,
    "finalized": [
      "thumb"
    ],
    "h264_1080_best": true,
    "h264_2160": true,
    "h264_360": true,
    "h264_540": true,
    "h264_720": true,
    "image_full": true,
    "image_high": true,
    "page_proxy": true,
    "thumb": true,
    "thumb_540": true,
    "thumb_orig_ar_540": true,
    "thumb_scrub": true
  },
  "team_id": "string",
  "user_permissions": {
    "can_download": true,
    "can_modify_template": true,
    "can_public_share_presentation": true,
    "can_public_share_review_link": true,
    "can_share_downloadable_presentation": true,
    "can_share_downloadable_review_link": true,
    "can_share_unwatermarked_presentation": true,
    "can_share_unwatermarked_review_link": true
  },
  "type": "file",
  "view_count": 1
}
```

**SDK Code**

```python Real-time upload with known filename
import requests

url = "https://api.frame.io/v2/assets"

payload = {
    "name": "my_video.mp4",
    "filetype": "video/mp4",
    "is_realtime_upload": True,
    "filesize": 1073741824,
    "channel": 0,
    "offset": -10,
    "parts": 100
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Real-time upload with known filename
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"name":"my_video.mp4","filetype":"video/mp4","is_realtime_upload":true,"filesize":1073741824,"channel":0,"offset":-10,"parts":100}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Real-time upload with known filename
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v2/assets"

	payload := strings.NewReader("{\n  \"name\": \"my_video.mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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 with known filename
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/assets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"my_video.mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}"

response = http.request(request)
puts response.read_body
```

```java Real-time upload with known filename
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"my_video.mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}")
  .asString();
```

```php Real-time upload with known filename
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/assets', [
  'body' => '{
  "name": "my_video.mp4",
  "filetype": "video/mp4",
  "is_realtime_upload": true,
  "filesize": 1073741824,
  "channel": 0,
  "offset": -10,
  "parts": 100
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Real-time upload with known filename
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"my_video.mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Real-time upload with known filename
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "name": "my_video.mp4",
  "filetype": "video/mp4",
  "is_realtime_upload": true,
  "filesize": 1073741824,
  "channel": 0,
  "offset": -10,
  "parts": 100
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/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 with unknown filename

**Request**

```json
{
  "extension": ".mp4",
  "filetype": "video/mp4",
  "is_realtime_upload": true,
  "filesize": 1073741824,
  "channel": 0,
  "offset": -10,
  "parts": 100
}
```

**Response**

```json
{
  "account_id": "string",
  "archive_from": "2024-01-15T09:30:00Z",
  "archive_scheduled_at": "2024-01-15T09:30:00Z",
  "archive_status": "string",
  "archived_at": "2024-01-15T09:30:00Z",
  "asset_type": "document",
  "bundle": true,
  "bundle_view": "string",
  "cover_asset_id": "string",
  "creator": {
    "digest_frequency": "string",
    "image_32": "string",
    "image_128": "string",
    "from_google": true,
    "mfa_enforced_at": "string",
    "email": "string",
    "name": "string",
    "image_64": "string",
    "timezone_value": "string",
    "account_id": "string",
    "updated_at": "string",
    "image_256": "string",
    "_type": "string",
    "user_hash": "string",
    "upload_url": "string",
    "profile_image": "string",
    "first_login_at": "string",
    "joined_via": "string",
    "id": "string",
    "next_digest_date": "string",
    "last_seen": "string",
    "inserted_at": "string",
    "roles": {
      "admin": true,
      "id": "string",
      "sales": true,
      "support": true
    },
    "user_default_color": "string"
  },
  "frames": 1,
  "hard_deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "index": 1.1,
  "is_bundle_child": true,
  "is_hls_required": true,
  "is_session_watermarked": true,
  "item_count": 1,
  "label": "string",
  "metadata": {},
  "metadata_flags": {
    "id": "string",
    "is_360": true,
    "is_hdr": true,
    "is_original_player_compatible": true
  },
  "name": "string",
  "original": "string",
  "parent_asset_id": "string",
  "project_id": "string",
  "properties": {
    "": "string"
  },
  "required_transcodes": {
    "cover": true,
    "finalized": [
      "thumb"
    ],
    "h264_1080_best": true,
    "h264_2160": true,
    "h264_360": true,
    "h264_540": true,
    "h264_720": true,
    "image_full": true,
    "image_high": true,
    "page_proxy": true,
    "thumb": true,
    "thumb_540": true,
    "thumb_orig_ar_540": true,
    "thumb_scrub": true
  },
  "team_id": "string",
  "user_permissions": {
    "can_download": true,
    "can_modify_template": true,
    "can_public_share_presentation": true,
    "can_public_share_review_link": true,
    "can_share_downloadable_presentation": true,
    "can_share_downloadable_review_link": true,
    "can_share_unwatermarked_presentation": true,
    "can_share_unwatermarked_review_link": true
  },
  "type": "file",
  "view_count": 1
}
```

**SDK Code**

```python Real-time upload with unknown filename
import requests

url = "https://api.frame.io/v2/assets"

payload = {
    "extension": ".mp4",
    "filetype": "video/mp4",
    "is_realtime_upload": True,
    "filesize": 1073741824,
    "channel": 0,
    "offset": -10,
    "parts": 100
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Real-time upload with unknown filename
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"extension":".mp4","filetype":"video/mp4","is_realtime_upload":true,"filesize":1073741824,"channel":0,"offset":-10,"parts":100}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Real-time upload with unknown filename
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v2/assets"

	payload := strings.NewReader("{\n  \"extension\": \".mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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 with unknown filename
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/assets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"extension\": \".mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}"

response = http.request(request)
puts response.read_body
```

```java Real-time upload with unknown filename
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Content-Type", "application/json")
  .body("{\n  \"extension\": \".mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}")
  .asString();
```

```php Real-time upload with unknown filename
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/assets', [
  'body' => '{
  "extension": ".mp4",
  "filetype": "video/mp4",
  "is_realtime_upload": true,
  "filesize": 1073741824,
  "channel": 0,
  "offset": -10,
  "parts": 100
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Real-time upload with unknown filename
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"extension\": \".mp4\",\n  \"filetype\": \"video/mp4\",\n  \"is_realtime_upload\": true,\n  \"filesize\": 1073741824,\n  \"channel\": 0,\n  \"offset\": -10,\n  \"parts\": 100\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Real-time upload with unknown filename
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "extension": ".mp4",
  "filetype": "video/mp4",
  "is_realtime_upload": true,
  "filesize": 1073741824,
  "channel": 0,
  "offset": -10,
  "parts": 100
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/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()
```

### Example 4

**Request**

```json
{
  "name": "my_video.mov",
  "filetype": "video/quicktime",
  "is_realtime_upload": false,
  "filesize": 1073741824
}
```

**Response**

```json
{
  "account_id": "string",
  "archive_from": "2024-01-15T09:30:00Z",
  "archive_scheduled_at": "2024-01-15T09:30:00Z",
  "archive_status": "string",
  "archived_at": "2024-01-15T09:30:00Z",
  "asset_type": "document",
  "bundle": true,
  "bundle_view": "string",
  "cover_asset_id": "string",
  "creator": {
    "digest_frequency": "string",
    "image_32": "string",
    "image_128": "string",
    "from_google": true,
    "mfa_enforced_at": "string",
    "email": "string",
    "name": "string",
    "image_64": "string",
    "timezone_value": "string",
    "account_id": "string",
    "updated_at": "string",
    "image_256": "string",
    "_type": "string",
    "user_hash": "string",
    "upload_url": "string",
    "profile_image": "string",
    "first_login_at": "string",
    "joined_via": "string",
    "id": "string",
    "next_digest_date": "string",
    "last_seen": "string",
    "inserted_at": "string",
    "roles": {
      "admin": true,
      "id": "string",
      "sales": true,
      "support": true
    },
    "user_default_color": "string"
  },
  "frames": 1,
  "hard_deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "index": 1.1,
  "is_bundle_child": true,
  "is_hls_required": true,
  "is_session_watermarked": true,
  "item_count": 1,
  "label": "string",
  "metadata": {},
  "metadata_flags": {
    "id": "string",
    "is_360": true,
    "is_hdr": true,
    "is_original_player_compatible": true
  },
  "name": "string",
  "original": "string",
  "parent_asset_id": "string",
  "project_id": "string",
  "properties": {
    "": "string"
  },
  "required_transcodes": {
    "cover": true,
    "finalized": [
      "thumb"
    ],
    "h264_1080_best": true,
    "h264_2160": true,
    "h264_360": true,
    "h264_540": true,
    "h264_720": true,
    "image_full": true,
    "image_high": true,
    "page_proxy": true,
    "thumb": true,
    "thumb_540": true,
    "thumb_orig_ar_540": true,
    "thumb_scrub": true
  },
  "team_id": "string",
  "user_permissions": {
    "can_download": true,
    "can_modify_template": true,
    "can_public_share_presentation": true,
    "can_public_share_review_link": true,
    "can_share_downloadable_presentation": true,
    "can_share_downloadable_review_link": true,
    "can_share_unwatermarked_presentation": true,
    "can_share_unwatermarked_review_link": true
  },
  "type": "file",
  "view_count": 1
}
```

**SDK Code**

```python
import requests

url = "https://api.frame.io/v2/assets"

payload = {
    "name": "my_video.mov",
    "filetype": "video/quicktime",
    "is_realtime_upload": False,
    "filesize": 1073741824
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"name":"my_video.mov","filetype":"video/quicktime","is_realtime_upload":false,"filesize":1073741824}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.frame.io/v2/assets"

	payload := strings.NewReader("{\n  \"name\": \"my_video.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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
require 'uri'
require 'net/http'

url = URI("https://api.frame.io/v2/assets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"my_video.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"my_video.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.frame.io/v2/assets', [
  'body' => '{
  "name": "my_video.mov",
  "filetype": "video/quicktime",
  "is_realtime_upload": false,
  "filesize": 1073741824
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"my_video.mov\",\n  \"filetype\": \"video/quicktime\",\n  \"is_realtime_upload\": false,\n  \"filesize\": 1073741824\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "name": "my_video.mov",
  "filetype": "video/quicktime",
  "is_realtime_upload": false,
  "filesize": 1073741824
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.frame.io/v2/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()
```