RelayDanceRelayDance
HomeModelsPricingDocsGet API Key

Docs / API Reference / Upload Files

POST/v1/files

Upload Files

Upload a local file and receive a hosted URL. Use that URL in metadata.content[] of a video task, for example as a reference_image.

#Request

Send as multipart/form-data:

FieldTypeDescription
fileFileThe file to upload

#Example: cURL

terminalbash
curl https://relaydance.com/v1/files \
  -H "Authorization: Bearer $RELAYDANCE_API_KEY" \
  -F "file=@input.jpg"

#Example: Python

upload.pypython
import requests, os

with open("input.jpg", "rb") as f:
    resp = requests.post(
        "https://relaydance.com/v1/files",
        headers={"Authorization": f"Bearer {os.environ['RELAYDANCE_API_KEY']}"},
        files={"file": f},
    )

data = resp.json()
print(data["id"], data["url"])

#Response

response.jsonjson
{
  "id": "file_abc123",
  "url": "https://..."
}
FieldTypeDescription
idstringFile identifier
urlstringHosted URL, ready to use as reference media
See Upload Files for the end-to-end workflow and Generate Video for the content[] schema the URL plugs into.