api.video
  1. Videos - Delegated upload
api.video
  • Account
    • Show account
      GET
  • Analytics
    • List live stream player sessions
      GET
    • List player session events
      GET
    • List video player sessions
      GET
  • Authentication
    • Authenticate
      POST
    • Refresh token
      POST
  • Live
    • List all live streams
      GET
    • Create live stream
      POST
    • Delete a live stream
      DELETE
    • Show live stream
      GET
    • Update a live stream
      PATCH
    • Delete a thumbnail
      DELETE
    • Upload a thumbnail
      POST
  • Players
    • List all players
      GET
    • Create a player
      POST
    • Delete a player
      DELETE
    • Show a player
      GET
    • Update a player
      PATCH
    • Delete logo
      DELETE
    • Upload a logo
      POST
  • Videos - Delegated upload
    • Upload with an upload token
      POST
    • List all active upload tokens.
      GET
    • Generate an upload token
      POST
    • Delete an upload token
      DELETE
    • Show upload token
      GET
  • Videos
    • List all videos
    • Create a video
    • Delete a video
    • Show a video
    • Update a video
    • Upload a video
    • Show video status
    • Pick a thumbnail
    • Upload a thumbnail
  • Captions
    • List video captions
    • Delete a caption
    • Show a caption
    • Update caption
    • Upload a caption
  • Chapters
    • List video chapters
    • Delete a chapter
    • Show a chapter
    • Upload a chapter
  • Webhooks
    • List all webhooks
    • Create Webhook
    • Delete a Webhook
    • Show Webhook details
  1. Videos - Delegated upload

Upload with an upload token

POST
/upload
When given a token, anyone can upload a file to the URI https://ws.api.video/upload?token=<tokenId>.
Example with cURL:
$ curl  --request POST --url 'https://ws.api.video/upload?token=toXXX'
 --header 'content-type: multipart/form-data'
 -F file=@video.mp4
Or in an HTML form, with a little JavaScript to convert the form into JSON:

Dealing with large files#

We have created a tutorial to walk through the steps required.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://ws.api.video/upload?token=to1tcmSFHeYY5KzyhOqVKMKb' \
--form 'file=@"path/to/video/video.mp4"'
Response Response Example
201 - response
{
    "assets": {
        "hls": "https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/hls/manifest.m3u8",
        "iframe": "<iframe src=\"//embed.api.video/vi4k0jvEUuaTdRAEjQ4Jfrgz?token=831a9bd9-9f50-464c-a369-8e9d914371ae\" width=\"100%\" height=\"100%\" frameborder=\"0\" scrolling=\"no\" allowfullscreen=\"\"></iframe>",
        "player": "https://embed.api.video/vi4k0jvEUuaTdRAEjQ4Jfrgz?token=831a9bd9-9f50-464c-a369-8e9d914371ae",
        "thumbnail": "https://cdn.api.video/stream/831a9bd9-9f50-464c-a369-8e9d914371ae/thumbnail.jpg"
    },
    "description": "An amazing video explaining the string theory",
    "metadata": [
        {
            "key": "Author",
            "value": "John Doe"
        },
        {
            "key": "Format",
            "value": "Tutorial"
        }
    ],
    "panoramic": false,
    "playerId": "pl45KFKdlddgk654dspkze",
    "public": false,
    "publishedAt": "4665-07-14T23:36:18.598Z",
    "source": {
        "uri": "/videos/vi4k0jvEUuaTdRAEjQ4Jfrgz/source"
    },
    "tags": [
        "maths",
        "string theory",
        "video"
    ],
    "title": "Maths video",
    "videoId": "vi4k0jvEUuaTdRAEjQ4Jfrgz"
}

Request

Query Params

Header Params

Body Params multipart/form-data

Responses

🟢201Created
application/json
Body

🟠400Bad Request
Modified at 2023-08-15 05:52:15
Previous
Upload a logo
Next
List all active upload tokens.
Built with