API Reference

The backend exposes a JSON REST API. Every UI action the frontend takes is implemented as a call to this API; everything you build against it has the same capabilities as the app itself.

Base URL

  • Desktop apphttp://localhost:18000/api (port may be dynamic; check the app’s diagnostics).
  • Dev modehttp://localhost:8000/api.
  • Self-hosted — wherever you deploy it, suffixed with /api.

Authentication

The default backend has no authentication — anyone with network access to the port can call the API. In a self-hosted multi-user deployment, put auth in front of the backend (reverse proxy, OAuth gateway, etc.).

AI provider keys are passed per-request when the user does not have them in backend/.env:

  • X-Provider-Key: <key> — for image / video generation.
  • X-Provider-Token, X-Provider-Secret — for Kling (two-part credentials).

Response shape

Most endpoints return JSON. Successful responses use HTTP 200; errors use the appropriate HTTP status with a JSON body:

{
  "detail": "Description of what went wrong",
  "code": "optional_machine_readable_code"
}

Auto-generated docs

The backend hosts FastAPI’s auto-generated docs:

  • Swagger UI<base-url>/docs
  • ReDoc<base-url>/redoc

These docs show every endpoint, parameters, and response schemas, generated from the running code. They are the authoritative reference; the articles below summarise the most useful endpoints in plain language.

Endpoint groups

Rate limits

There are no application-level rate limits on the backend. AI calls are limited by the upstream provider (OpenAI, Anthropic, etc.).

Versioning

The API is versionless. Breaking changes are rare but possible; pin to a specific backend version if you build against it.

In this section

Was this helpful?

0

Updated

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *