Skip to content

API Overview

The AutoVio backend exposes a REST API under /api. You can use it to manage projects, works, run the video pipeline (analyze, scenario, generate, export), and manage assets and templates.

When running locally: http://localhost:3001. All endpoints are prefixed with /api.

Most endpoints require authentication:

  • Web UI: Uses JWT (access token from login/register). The frontend sends Authorization: Bearer <accessToken>.
  • API tokens: For server-to-server or MCP, create an API token in the UI (or via POST /api/tokens) with scopes (e.g. projects:read, works:write, ai:generate). Send it as Authorization: Bearer <token>.

See Authentication for login, register, refresh, and token scopes.

For analyze, scenario, and generate endpoints, the client tells the backend which AI provider and key to use via headers:

HeaderUsed byExample
x-vision-providerAnalyzegemini, claude, openai
x-llm-providerScenariogemini, claude, openai
x-image-providerGenerate imagegemini, dalle
x-video-providerGenerate videogemini, runway
x-model-idOptional modele.g. gemini-2.0-flash-exp
x-api-keyProvider API key(key for the chosen provider)

The backend forwards the key to the external provider; it does not store provider keys in env.

GroupDescription
AuthenticationRegister, login, refresh, me
ProjectsCRUD projects
WorksCRUD works, media (reference, scene image/video)
AI EndpointsAnalyze, scenario, generate image/video, export
TemplatesList, create, get, update, delete, apply templates
AssetsList, upload, get, update, delete project assets
ProvidersList available AI providers (no auth)

When the backend is running, OpenAPI documentation is available at /api/docs (Swagger UI or equivalent). Use it for exact request/response schemas and examples.