a↗Alex Studio HQ/   Developers
ALEX STUDIO HQ / DOCUMENTATION

A predictable API.

JSON in, JSON out. Project-scoped access on every request.

Authentication

Authorization: Bearer YOUR_PROJECT_API_KEY
Content-Type: application/json

Use keys on your backend only. Do not embed them in websites, browser bundles, mobile apps, public repositories, or prompts sent to untrusted services.

Endpoints

MethodPathPermission
GET/v1/capabilitiesAny valid key
GET/v1/files?cursor=VALUEfiles
GET / PUT / DELETE/v1/files/{name}files; PUT uses raw bytes
POST/v1/workflowsworkflows + ai + data; Idempotency-Key
GET/v1/workflows/{id}workflows
GET/v1/data/{collection}?offset=0data
GET / PUT / DELETE/v1/data/{collection}/{key}data
GET / PUT / DELETE/v1/config/{key}config
POST/v1/ai/generateai
POST/v1/agents/{session}/messagesagents + ai
POST/v1/email/sendemail; Idempotency-Key
POST/v1/reportsreports; Idempotency-Key
POST/v1/jobsjobs + ai
GET/v1/jobs/{id}jobs

Request bodies

PUT /v1/data/notes/note-1
{ "value": { "title": "Hello" } }

PUT /v1/config/theme
{ "value": { "mode": "dark" } }

POST /v1/ai/generate
{ "prompt": "Summarize this short text..." }

POST /v1/agents/my-session/messages
{ "message": "Help me plan this project." }

POST /v1/jobs
Idempotency-Key: a-unique-operation-id
{ "task": "ai.generate", "input": { "prompt": "Draft a summary..." } }

For complete file upload/download and durable Workflow examples, read Files, workflows & recovery. File uploads use raw bytes instead of JSON.

Data boundaries

Collection names, record keys, config keys, and session names use letters, numbers, underscores, or hyphens, up to 80 characters. Record writes accept at most 16 KiB of JSON and each project is capped at 1,000 records. Collection listing returns up to 50 records with a nextOffset. Projects cannot choose another project’s identity or run arbitrary SQL.

Configuration writes accept up to 4 KiB of JSON. KV is eventually consistent: recently updated values may not appear immediately in every region. Use D1 records for data that needs immediate read-after-write behavior.

Providers, aliases, streaming, sandboxes, keys and project domains →

AI and agents

Prompts and agent messages are limited to 4,000 characters; generated output is limited to 256 tokens. Sessions retain the last 10 messages and expire after 7 idle days. This release supports conversation memory, not autonomous tool execution or the complete Agents SDK.

Errors and retries

{
  "error": { "code": "feature_forbidden", "message": "…" },
  "requestId": "…"
}

401: missing or revoked key. 403: paused project or missing permission. 409: busy agent or conflicting idempotency key. 429: shared capacity, safety throttle, or upstream provider limit reached. 503: module unavailable.

Requests and failed attempts are recorded for usage visibility. Retry transient reads with bounded backoff. Do not automatically retry AI calls or writes. Job submissions require an idempotency key; duplicate delivery can still repeat AI inference after a consumer crash, although a job has one stored result. Queues retain messages for 24 hours.

Download the OpenAPI specification ↗

Alex Studio HQ v0.5 · Providers