Video to Sound API (0.2)

API documentation for Video to Sound - the AI-powered sound design platform.

Documentation changes in 0.2

This version corrects the documentation to match how the API already behaves. The API itself has not changed.

  • Session IDs are 16-character hex strings (e.g. 2876638c8e3a53f5), not UUIDs. Chunked upload IDs are UUIDs.
  • The upload limit is checked when the upload is finished (the POST that creates the session) and returns 400 with error_code UPLOAD_LIMIT_EXCEEDED, not 403.
  • Validation errors that carry an error_code return their top-level values as one-item lists and the values in details as strings.
  • processing_arguments.user_prompt is limited to 250 characters. All accepted processing_arguments keys are now listed; unknown keys are rejected.
  • The API key security scheme uses the Authorization header (Authorization: Api-Key <api_key>).
  • cancelled is a terminal session status, alongside completed and failed.
  • The full session object and all output files are documented.
  • "Rerun a session" is deprecated: use "Regenerate session" instead.

Authentication

All API endpoints except "Get a video" require the krotos-client header value to be set to "v2s".

All API endpoints except "Get a video" require authentication. Authentication must be done either by using an API key or using a JWT. Do not use both.

API key

Include the API key in the Authorization header:

Authorization: Api-Key <api_key>

JWT

Obtain tokens via the "Obtain JWT token pair" endpoint.

Include the access token in the Authorization header:

Authorization: Bearer <access_token>

Rate Limits

API requests are rate-limited per account. Chunk uploads have their own limit of 100 requests per minute. When rate limited, a request will receive a 429 Too Many Requests response with a Retry-After header.

Errors

Errors return JSON in one of these shapes:

  • {"detail": "..."}: authentication, permission, not found, rate limiting, and chunk upload errors.
  • {"error": "..."}: a request that is not allowed in the session's current state (e.g. regenerating a session that has not completed).
  • Validation errors: an object keyed by field name, each with a list of messages, e.g. {"processing_arguments": ["Unknown argument: foo"]}. Plan limit errors (UPLOAD_LIMIT_EXCEEDED, VIDEO_TOO_LONG) also come in this shape, with error, error_code and details keys.

Authenticated requests that are not allowed to use Video to Sound (for example a missing or wrong krotos-client header, or an account without access) receive 403 Forbidden.

Overview
Servers
Production
https://krotos.studio/api/v2