Skip to content

LiberAstra API reference ​

All endpoints except /healthz and /auth/* require Authorization: Bearer <JWT or astra_ token>.

Interactive docs: open /docs (Swagger UI) after the app starts.

Auth ​

MethodPathPurpose
GET/api/v1/auth/statusWhether the instance has been initialized
POST/api/v1/auth/setupCreate the first administrator
POST/api/v1/auth/loginLog in and return a JWT
GET/POST/DELETE/api/v1/tokens[/{id}]Issue, list, and revoke API tokens

Providers and capabilities ​

MethodPathPurpose
GET/api/v1/capabilitiesProvider type registry and capability tags
GET/POST/api/v1/providersList / create providers (api_key stored encrypted)
PATCH/DELETE/api/v1/providers/{id}Update / delete
POST/api/v1/providers/{id}/testTest the connection
GET/api/v1/providers/{id}/modelsFetch and cache the live model list

Jobs ​

MethodPathPurpose
GET/api/v1/jobsList jobs (status_filter, kind, limit)
GET/api/v1/jobs/{id}Job detail
GET/api/v1/jobs/{id}/eventsSSE progress stream (snapshot + deltas + heartbeat)
POST/api/v1/jobs/{id}/cancel / retryCancel / retry

All generation endpoints return 202 with a Job by default. Add ?wait=true to wait for the terminal state.

Capabilities ​

MethodPathPurpose
POST/api/v1/llm/chatLLM chat (Job)
POST/api/v1/ttsText to speech (voice or voice_record_id)
POST/api/v1/asrSpeech to text (multipart; export txt/srt/vtt/json)
GET/POST/DELETE/api/v1/voicesVoice library (reference audio + voice_id + default voice)
POST/api/v1/images/generate / editText-to-image / image edit (ComfyUI requires a workflow pack name)
POST/api/v1/images/optimize-promptExpand a prompt with the LLM
GET/POST/DELETE/api/v1/workflows[/{name}], /workflows/importWorkflow pack management
POST/api/v1/videos/quickQuick Create (topic/script/storyboard)
POST/api/v1/videos/i2v / avatar / motion / assetsImage-to-video / digital human / motion transfer / custom assets (multipart)
POST/api/v1/uploadsGeneral uploads referenced by parameters such as BGM
GET/api/v1/assets[/{id}[/content]]Asset list / detail / content download
GET/api/v1/system/info, POST cleanup, GET backupSystem info / cleanup / backup export (administrator)

OpenAI-compatible subset (/v1) ​

MethodPathPurpose
POST/v1/chat/completionsProxy the default LLM (streaming is not supported yet)
POST/v1/audio/speechDefault TTS provider
POST/v1/audio/transcriptionsDefault ASR provider (json/text/srt/vtt)
POST/v1/images/generationsOnline image provider (b64_json/url; use /api/v1/images/generate for ComfyUI providers)