> 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://next.developer.frame.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://next.developer.frame.io/_mcp/server.

# 创建 C2C 资产

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

**此端点已弃用**。请改用 `/v2/devices/assets`。虽然此端点将继续正常运行，但为了与 C2C API 的其余部分保持一致，我们建议集成方开始使用新的端点。

专用于 C2C 设备和应用程序的资产上传初始化。

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 <token>`, 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` (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.

- `设备_deviceAssetCreateDeprecated_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

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

### V2AssetsPostRequestBodyContentApplicationJsonSchemaChannel

### V2AssetsPostRequestBodyContentApplicationJsonSchemaOffset

### V2AssetsPostRequestBodyContentApplicationJsonSchemaParts

### RealtimeAssetResponse

- `id` (string, required) — 此资产的 ID，可用于类似 `https://app.frame.io/player/:id` 的链接中，以直接跳转到该资产。
- `name` (string, required) — 表示资产的名称（文件名）。

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

## Examples

### Regular upload with known filename (application/json)

**Request**

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

**SDK Code**

```python Regular upload with known filename (application/json)
import requests

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

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

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

print(response.json())
```

```javascript Regular upload with known filename (application/json)
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', '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 Regular upload with known filename (application/json)
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("Authorization", "Bearer <token>")
	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 with known filename (application/json)
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["Authorization"] = 'Bearer <token>'
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 Regular upload with known filename (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Authorization", "Bearer <token>")
  .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 Regular upload with known filename (application/json)
<?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' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Regular upload with known filename (application/json)
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
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 Regular upload with known filename (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "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()
```

### Regular upload as new version of existing asset (application/json)

**Request**

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

**SDK Code**

```python Regular upload as new version of existing asset (application/json)
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 = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Regular upload as new version of existing asset (application/json)
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', '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 (application/json)
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("Authorization", "Bearer <token>")
	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 (application/json)
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["Authorization"] = 'Bearer <token>'
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 (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Authorization", "Bearer <token>")
  .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 (application/json)
<?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' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Regular upload as new version of existing asset (application/json)
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
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 (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "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 (application/json)

**Request**

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

**SDK Code**

```python Real-time upload with known filename (application/json)
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 = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Real-time upload with known filename (application/json)
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', '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 (application/json)
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("Authorization", "Bearer <token>")
	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 (application/json)
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["Authorization"] = 'Bearer <token>'
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 (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Authorization", "Bearer <token>")
  .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 (application/json)
<?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' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Real-time upload with known filename (application/json)
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
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 (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "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 (application/json)

**Request**

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

**SDK Code**

```python Real-time upload with unknown filename (application/json)
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 = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Real-time upload with unknown filename (application/json)
const url = 'https://api.frame.io/v2/assets';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', '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 (application/json)
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("Authorization", "Bearer <token>")
	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 (application/json)
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["Authorization"] = 'Bearer <token>'
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 (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.frame.io/v2/assets")
  .header("Authorization", "Bearer <token>")
  .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 (application/json)
<?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' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Real-time upload with unknown filename (application/json)
using RestSharp;

var client = new RestClient("https://api.frame.io/v2/assets");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
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 (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "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()
```