Skip to main content
POST
/
api
/
v1
/
assets
/
upload-resumable
Begin Upload
curl --request POST \
  --url https://roughy-api-staging.fly.dev/api/v1/assets/upload-resumable \
  --header 'Authorization: Bearer <token>'
{
  "asset": {
    "content_type": "audio/mpeg",
    "created_at": "2026-05-02T08:54:52.423000Z",
    "id": "019de7f7-3a52-74d1-9eeb-323e0bfb7bb9",
    "state": "pending_upload",
    "type": "audio_input"
  },
  "expires_at": "2026-05-03T08:54:52.423000Z",
  "session_id": "019df1a4-2385-7091-9f9f-4c350b988497"
}

Documentation Index

Fetch the complete documentation index at: https://docs.roughy.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

An API key — either a programmatic key minted via POST /api-keys or a session-class key minted by POST /auth/login / an OAuth callback. Pass it as Authorization: Bearer <token>. UI flows can omit the header — the roughy_session HttpOnly cookie set by login + OAuth callbacks is read as a fallback.

Headers

Upload-Length
integer | null
Upload-Metadata
string | null
Tus-Resumable
string | null

Cookies

roughy_session
string | null

Response

Successful Response

POST /assets/upload-resumable JSON body.

The TUS-protocol surface lives in HTTP headers (Location, Tus-Resumable, Upload-Expires); this body is the machine-parseable companion for non-browser callers (CLI, SDK, integration tests) so they can recover the asset id + session id without parsing the Location URL. Browser TUS clients ignore the response body.

asset
AssetSummary · object
required

Public projection of an assets row (no signed URLs).

Example:
{
"content_type": "audio/mpeg",
"created_at": "2026-05-02T08:54:52.423000Z",
"duration_seconds": "324.412",
"id": "019de7f7-3a52-74d1-9eeb-323e0bfb7bb9",
"size_bytes": 4823572,
"state": "ready",
"type": "audio_input"
}
session_id
string<uuid>
required
expires_at
string<date-time>
required