Skip to contentOceanToken

17 min read

Video API Reference Assets: Upload Once

Upload a character sheet or product shot once with a video API reference assets endpoint, then reuse its id across Seedance, Kling, Hailuo and Wan requests.

By OceanToken Team

Video API Reference Assets: Upload Once

Editor's note: Most teams that run several video models start by pasting the same character sheet URL into every request, then discover the URL expired, moved or got rate limited by whatever host it lives on. Our view is that reference media deserves the same treatment as code: store it once, give it a stable name, and let each request point at it. Two details in our own docs still disagree, so we flag them instead of guessing.

Short answer: Video API reference assets let you upload a character sheet, product shot, clip or soundtrack once with POST /v1/assets, keep the returned asset_... id, and name that id in later video requests instead of sending the file again. One upload can feed Seedance, Kling, Hailuo and Wan, as long as each request stays inside that model's reference limits.

Key takeaways:

  • On OceanToken, one key reaches Seedance, Kling, Hailuo and Wan through the same POST /v1/videos call, and one asset library sits behind that key, so a character sheet uploaded once can be reused across all four model families (docs.oceantoken.ai, checked November 28, 2026).
  • Uploads are multipart: images up to 30 MB, video up to 50 MB, audio up to 15 MB. Images and video frames pass a content check first, and a refused file is not stored or charged.
  • The answer gives you an id, an asset:// reference and a preview link that lasts one hour. Store the id, never the preview link.
  • Each model takes a different number of references. Read referenceLimits from the model spec before you send, because going over is a 400, not a silent trim.

01 · Video API reference assets: what they are and why they help

An asset is a reference image, video or audio file that you upload once and then name by its id in image and video requests. The console's Assets page shows the same library you reach from code, so a producer can drop files in by hand while a script uses them by id.

The problem assets solve is mundane but expensive. A video request that carries references needs a link the model can fetch, or a data URL. Our video guide says media you send should be public URLs or data URLs, each up to 25 MB, and that the whole request should stay under 10 MB where you can. That pushes you toward hosting files somewhere public. Then the link has to stay up, stay public and stay fast for every job, including jobs that sit in a queue for a while. If the link breaks, the job fails with invalid_request because the model could not read the reference.

With an asset, the file lives next to the API that uses it. The request carries a short id instead of a URL you have to babysit. That matters most in three situations:

Situation Without assets With assets
One character across many shots Same public URL pasted into every request One asset_... id stored in your shot list
Same shot tried on several models Each test depends on an external host staying up Each request names the same id
Large reference video Hosted elsewhere or base64 that bloats the request Uploaded once, up to 50 MB
Team with a shared look book Links scattered across chats and docs One library, visible in the console

None of this changes how a model reads the reference. If your character drifts between shots, that is a prompting and reference-choice problem, and our guide to Seedance character consistency across shots covers it. This article is about storage and plumbing: how the file gets in, how requests point at it, and how you keep the library tidy.

02 · Upload reference image API: POST /v1/assets

To upload a reference image through the API, send a multipart POST /v1/assets with the file and an optional name, and keep the id from the answer. The type is read from the file itself, not from the extension you give it.

curl https://api.oceantoken.ai/v1/assets \
  -H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
  -F file=@character-sheet.png \
  -F name="Mara - character sheet v2"

These are the file rules, as our API reference and the console page list them on November 28, 2026:

Kind Formats Largest file Checked before storing
Image JPEG, PNG, WebP 30 MB Yes, against the content policy
Video MP4, MOV 50 MB Yes, its frames are checked
Audio MP3, WAV, M4A 15 MB Not stated for audio

Anything outside that list is refused with 400. A file that fails the content check is refused with 400 content_filtered, and the docs are explicit that a refused upload stores nothing and costs nothing. That is useful during a batch import: you can push a folder of candidate references, log the refusals, and lose nothing but the time.

The answer is the asset object. These fields are the ones worth knowing:

Field What it holds What to do with it
id Starts with asset_ Store it in your shot list or database
reference asset:// followed by the id Use it where a request expects a link
kind image, video or audio Filter and validate before a request
mime_type, bytes The detected type and size Sanity-check what was actually stored
width, height Image dimensions, images only Check the aspect ratio matches your shot
name The name you sent Make it human-readable for the console
url A preview link valid for one hour Show it in a UI; never store it
storage Your storage after this upload Watch it against your cap

The preview url is the field people misuse. It looks like a perfectly good link to put in a video request, and it will work for an hour. A job that sits in your account's queue, or a script you rerun tomorrow, will then fail on a dead link. Store the id. If you need a fresh preview later, GET /v1/assets/{asset_id} returns one.

One more condition before you script uploads: an upload, like a model request, needs a balance above zero. Storing and using assets is not billed, but an account at zero cannot add to its library.

03 · Where the asset id goes in a video request

The general rule in our API reference is simple: put the id, or the reference, wherever an image or video request takes a link to a file. The harder question is which field that is, and here our own pages use two vocabularies.

The video guide and each video model's API reference describe two array fields. frame_images carries the first and last frame, each entry marked with frame_type. input_references carries reference images, videos and audio, each entry typed as image_url, video_url or audio_url with a url inside. The video guide also accepts shorter forms for frames, "first_frame": "https://..." and "last_frame": "https://...".

Diagram: From one upload to requests on several video models

The console's Assets page, by contrast, lists first_frame, last_frame, reference_images, reference_videos, reference_audios, and image for image edits as the places an asset id can go. The frame names match the video guide's short forms. The three reference_* names do not appear in the video guide or in the model references we read.

We are not going to tell you which reading is right, because we have not run it. What we can say is which shape we would build on: the one the video model references document, with the asset reference placed in the url slot of each entry.

{
  "model": "bytedance/seedance-2.5",
  "prompt": "The woman from image 1 walks through a night market, handheld camera",
  "duration": 5,
  "resolution": "720p",
  "input_references": [
    {"type": "image_url", "image_url": {"url": "asset://asset_REPLACE_WITH_YOUR_ID"}}
  ]
}

Treat that body as the first thing to confirm on your own account, not as a verified recipe. Send it once with the asset:// reference, once with the bare asset_... id, and once with the console's reference_images field, then keep whichever form the model accepts. The test costs one short clip per form, and it settles the question for your code before you write a library around it. Section "How to test this on your workload" lists it as item 1.

Two rules from the video guide apply no matter how you name the file. On Seedance, a request carries frames or references, not both, and sending both is refused with 400. And when a model cannot use a reference you sent, it refuses with 400 rather than dropping it without telling you. If you are new to the frame route, our Seedance image-to-video guide explains when a first frame beats a reference image.

04 · Reuse a character reference across shots and models

To reuse a character reference across shots through the API, upload the character sheet once, keep its id in your shot list, and send the same id in every shot's input_references. Changing models then means changing model and checking the new model's limits, nothing else.

Here is a small script that does exactly that. It uploads one image, then submits the same shot to four model families with an Idempotency-Key, so a retry after a network timeout cannot start, and charge, a second job.

import os, time, uuid
import requests

BASE = "https://api.oceantoken.ai/v1"
H = {"Authorization": f"Bearer {os.environ['OCEANTOKEN_API_KEY']}"}

# 1. Upload once
with open("mara-sheet.png", "rb") as f:
    asset = requests.post(
        f"{BASE}/assets", headers=H,
        files={"file": f}, data={"name": "Mara - character sheet v2"},
    ).json()
ref = asset["reference"]          # "asset://asset_..."; store asset["id"] too
print("stored", asset["id"], asset["kind"], asset["bytes"])

# 2. Same reference, four model families
MODELS = [
    "bytedance/seedance-2.5",
    "kwaivgi/kling-v3.0-std",
    "minimax/hailuo-3",
    "alibaba/wan-3.0-prime",
]
PROMPT = "The woman from image 1 orders tea at a street stall, slow push-in"

jobs = {}
for model in MODELS:
    body = {
        "model": model,
        "prompt": PROMPT,
        "duration": 5,
        "input_references": [
            {"type": "image_url", "image_url": {"url": ref}},
        ],
    }
    r = requests.post(
        f"{BASE}/videos",
        headers={**H, "Idempotency-Key": str(uuid.uuid4())},
        json=body,
    )
    if r.status_code != 200:
        print(model, r.status_code, r.text[:200])   # read the message
        continue
    jobs[model] = r.json()["id"]

# 3. Poll every 15 seconds
while jobs:
    for model, vid in list(jobs.items()):
        job = requests.get(f"{BASE}/videos/{vid}", headers=H).json()
        if job["status"] in ("completed", "failed"):
            print(model, job["status"], job.get("content_url") or job.get("error"))
            del jobs[model]
    time.sleep(15)

A few choices in that script are deliberate. The request leaves out resolution, because the models disagree on it: our video guide says kwaivgi/kling-v3.0-std is made at 720p only and refuses anything else, and the Hailuo 3 reference lists 2K and 768P rather than the p values the others use. Leaving the field out lets each model use its own default while you compare. Once you pick a model, set the resolution explicitly for that model.

The error branch prints the response body instead of raising. A 400 here is almost always informative: the docs promise that a refused value comes back with a message saying what the model takes. Reading it is faster than guessing.

The script also polls slowly. Our video guide asks for a poll every 10 to 20 seconds, and notes that a job beyond your account's concurrent limit stays queued with a queue_position. Four jobs at once fits comfortably within the per-tier numbers the docs publish for paid tiers, but a larger fan-out will queue, which is fine: queued jobs start on their own and are not charged while they wait.

What you should not expect is identical results. The four models read the same reference image differently, and each has its own way of describing who the subject is. Kling's element-style prompting, for example, has its own conventions, covered in our Kling elements and reference images guide, and Hailuo's subject reference has its own habits, covered in our Hailuo subject reference guide. The asset keeps the input fixed so that the differences you see come from the model, which is exactly what you want in a comparison.

05 · Video API reference limits by model

Video API reference limits are set per model, and the way to read them is the model spec: GET /oceantoken/video/model-spec?model=... returns referenceLimits along with durations, resolutions and the modes the model supports. Going over the limit is refused with 400 before anything runs.

These are the limits we read in the docs on November 28, 2026, for the four models in the script above:

Model Reference images Reference videos Reference audio Where it is stated
bytedance/seedance-2.5 Up to 30 Up to 10 Up to 10 Model API reference
minimax/hailuo-3 Up to 9 Up to 3 Up to 3 Model API reference
alibaba/wan-3.0-prime Up to 10 Not listed Not listed Model API reference
kwaivgi/kling-v3.0-std At most 6 Not listed Not listed Example refusal in the video guide

Treat the Kling row with care. It comes from the guide's sample error message ("takes at most 6 reference images; 7 were sent"), not from a spec page, so read referenceLimits for that model before you build a six-image workflow on it. The Wan row lists images only, which suggests a character sheet library works there while reference clips and soundtracks may not. Again, the spec answers that in one call.

Checking the limit in code costs one request per model, and it saves a failed batch:

def reference_limits(model: str) -> dict:
    r = requests.get(
        "https://api.oceantoken.ai/oceantoken/video/model-spec",
        headers=H, params={"model": model},
    )
    r.raise_for_status()
    return r.json()["spec"].get("referenceLimits") or {}

for m in MODELS:
    print(m, reference_limits(m))

Print the raw referenceLimits the first time rather than assuming key names. Our docs name the object but do not show its inner shape in the guide, and you want to see whether it counts images, videos and audio separately before you write a check against it.

Two related details from the guide are easy to miss. On the 2.0 -upscaled Seedance models, reference audio needs a reference image or video next to it, which the spec flags as referenceAudioNeedsVisual. And a model that does not support references at all will refuse an input_references array instead of ignoring it. Both cases are cheap to catch with the spec call above, and expensive to discover after a batch has failed.

06 · Managing the library: list, delete and storage

The library is small to manage, but it does need managing, because the storage cap depends on your tier and an upload that does not fit is refused with 403.

Four endpoints cover everything:

Call What it does Detail worth knowing
GET /v1/assets Lists assets, newest first limit 20 by default, at most 100; kind filters to image, video or audio
GET /v1/assets/{asset_id} Returns one asset Comes with a fresh one-hour preview link
DELETE /v1/assets/{asset_id} Removes it for good Later requests that use the id fail; videos already made are not affected
GET /v1/assets/storage Your usage used_bytes, cap_bytes, available_bytes, asset_count

Paging works by cursor. The list returns data, has_more and next_cursor, and you send next_cursor back as after for the next page:

def all_assets(kind=None):
    params = {"limit": 100}
    if kind:
        params["kind"] = kind
    while True:
        page = requests.get(f"{BASE}/assets", headers=H, params=params).json()
        yield from page["data"]
        if not page.get("has_more"):
            break
        params["after"] = page["next_cursor"]

storage = requests.get(f"{BASE}/assets/storage", headers=H).json()
print(storage["used_bytes"], "of", storage["cap_bytes"], "bytes used")

Deleting is final, and the consequence is specific: any later request that names the deleted id fails, and an id from another account, or of a deleted asset, answers 404. That is reasonable behavior, but it means a cleanup script can break tomorrow's render queue. Before you delete, check that no pending shot list still names the id.

A handful of habits keep a shared library usable:

  • Names that sort. Put the project, subject and version in name, such as "Mara - character sheet v2". The console shows names; your teammates will search them.
  • One source of truth for ids. Keep the mapping from shot to asset id in your own database or shot list, not in people's heads or chat history.
  • Version, do not overwrite. Upload a new sheet as a new asset and update the shot list. Old renders keep their history, and you can compare versions.
  • Prune on a schedule. According to the Assets pages, assets stay until you delete them, so unused test uploads accumulate until you remove them.
  • Watch the cap. Call the storage endpoint before a large import and stop early if available_bytes will not cover it.

That pruning advice rests on one statement we cannot fully reconcile. The API reference and the console page both say assets are kept until you delete them. Our limits page has a retention table that says files you upload are kept for 30 days after upload, then deleted automatically. The two may describe different things, since the limits table also covers files attached in the console's Chat, but the pages do not say so. Until that is clarified, do not treat the library as an archive: keep your master files in your own storage, and add the retention check below to your test plan.

07 · Errors you will meet, and what each one means

Most asset errors are refusals before anything runs, which makes them cheap. The trick is telling them apart quickly.

You see Likely cause What to do
400 on upload File type outside the supported list Convert to JPEG, PNG, WebP, MP4, MOV, MP3, WAV or M4A
400 content_filtered on upload The image or a video frame failed the content check Change the file; nothing was stored or charged
403 on upload Storage cap reached Delete unused assets or check your tier; the message says how much is used
404 in a video request Id from another account, or a deleted asset Re-upload, or fix the id in your shot list
400 naming a reference count More references than the model takes Read referenceLimits and trim
400 on a Seedance request Frames and references in one request Send one or the other
Job failed with invalid_request The model could not read a reference Confirm the field and the reference form (section 03)

Diagram: Which fix for which asset error

The last row is the one to watch while the field-name question in section 03 is open. If a request is accepted and the job later fails with invalid_request, the likeliest explanation is that the reference reached the model in a form it could not read. Switch to the other documented form and retry with a new Idempotency-Key, because the body changed.

How to test this on your workload

We have not run these checks for you, and two of them exist because our own pages disagree. Each is a single request or a short script.

  1. Which field takes the asset. Upload one image. Send the same short 480p or 720p shot three times: input_references with "url": "asset://...", input_references with the bare asset_... id, and the console's reference_images field with the id. Record which are accepted and which jobs complete. Repeat once with frame_images and a first_frame entry.
  2. Retention. Note the upload date of one test asset and check it is still listed by GET /v1/assets after 31 days. This settles whether the 30-day figure on the limits page applies to assets.
  3. Reference limits. Call the model spec for each model you plan to use and print referenceLimits. Then send one request with one more image than the limit and confirm you get a 400 that names the limit.
  4. Cross-model reuse. Run the section 04 script with your own character sheet and keep all four clips. Judge identity, outfit and proportions side by side.
  5. Upload refusals. Push a folder of candidate references and log every 400 and 400 content_filtered. Confirm with GET /v1/assets/storage that refused files did not count against storage.
  6. Delete behavior. Delete a test asset, then submit a request that names it and confirm the 404. Check that a video made from it earlier still downloads within its 24-hour link.
  7. Storage cap. Read cap_bytes for your account, and note the 403 message if you deliberately exceed it in a test account.
  8. Preview expiry. Save the preview url from an upload and open it after an hour, so everyone on your team sees why it must not be stored.

Our take: Treat reference media like code. Upload each character sheet, product shot and reference clip once, store the id in your shot list, and let requests name it. When you switch models, change model, check that model's referenceLimits, and leave the files alone. Keep master files in your own storage until the retention question is settled.

Running it on OceanToken

The base URL is https://api.oceantoken.ai/v1. Assets live at /v1/assets, video jobs at /v1/videos, and the model ids in this article are bytedance/seedance-2.5, kwaivgi/kling-v3.0-std, minimax/hailuo-3 and alibaba/wan-3.0-prime. What helps for reference-heavy video work, from our docs as of November 28, 2026:

  • One key and one asset library for every video model. The same key that calls Seedance also calls Kling, Hailuo and Wan, and they all read from the library you upload to, so a comparison is a loop over model ids rather than four accounts and four upload flows.
  • Same request shape across models. Every video model uses create, poll and download on POST /v1/videos, with frame_images and input_references, so switching is the model string plus that model's options.
  • Refusals before charges. A value a model does not take is refused with 400 before anything runs or is charged, a refused upload stores and costs nothing, and a failed video job is not charged.
  • Storing assets is not billed. Uploading and using assets costs nothing on its own; you pay for the video jobs. Prepaid balance, no subscription.

Price: see the current rate on /video, and per family on /seedance-api, /kling-api, /hailuo-api and /wan-api. Model pages: Seedance 2.5, Kling V3.0 Std, Hailuo 3 and Wan 3.0 Prime.

FAQ

Can I upload a reference image once and reuse it in many video requests? Yes. Upload it with POST /v1/assets, keep the asset_... id, and name the id or its asset:// reference wherever a request takes a link to the file.

Can I use an asset id as the first frame? Our API reference says the id goes wherever a request takes a link, and the console page names first_frame. Send one test request with a frame_images entry and one with the short first_frame form before relying on either.

How long are assets kept? The Assets pages say until you delete them, while the limits page lists uploaded files at 30 days. Keep master copies yourself and check one test asset after a month.

Do assets cost anything? Storing and using them is not billed. An upload does need a balance above zero, and the video jobs that use them are charged as usual.

How many reference images can a video model take? It depends on the model: the docs list 30 on Seedance 2.5, 9 on Hailuo 3 and 10 on Wan 3.0 Prime. Read referenceLimits from the model spec for the current number.

What happens to old videos if I delete an asset? They are not affected. Only later requests that still name the deleted id fail, with 404.

Sources

  1. docs.oceantoken.ai: API reference, Assets  (checked 2026-11-28)
  2. docs.oceantoken.ai: Console, Assets  (checked 2026-11-28)
  3. docs.oceantoken.ai: Video guide  (checked 2026-11-28)
  4. docs.oceantoken.ai: Limits and retention  (checked 2026-11-28)
  5. docs.oceantoken.ai: Seedance 2.5 API reference  (checked 2026-11-28)
  6. docs.oceantoken.ai: Hailuo 3 API reference  (checked 2026-11-28)
  7. docs.oceantoken.ai: Wan 3.0 Prime API reference  (checked 2026-11-28)

Get your OceanToken API key

  1. Create an OceanToken account and an API key.
  2. Copy the snippet below, paste your key, and run it.
  3. Check the current rate on /seedance-api.
curl https://api.oceantoken.ai/v1/videos \
  -H "Authorization: Bearer $OCEANTOKEN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "bytedance/seedance-2.5", "prompt": "A paper boat drifting down a rain-soaked street", "duration": 5, "resolution": "480p"}'

Upload your references first with POST /v1/assets, then add them to input_references as shown above.

Get API Key 

  • AI video
  • Tutorial
  1. 11 min read

    Veo 3.1 Reference Images API Guide

    How to send reference images to Veo 3.1 through the API: input_references vs first frame, which tiers take them, two-shot Python script and a consistency test.

    • Veo
    • AI video
    • Tutorial
  2. 12 min read

    LLM Function Calling API Across Models

    Write one LLM function calling API loop that works across GPT, Claude, Gemini, Qwen, GLM and DeepSeek: tool_choice, streaming and the silent no-call trap.

    • LLM API
    • Tutorial
  3. 10 min read

    LLM Image Input API: Screenshots and Scans

    Send screenshots, photos and scans to a chat model with one LLM image input API: URL vs base64 data URL, per-model image limits, the 400 error and token costs.

    • LLM API
    • Tutorial