Skip to main content
idapt
HomeCodeAI ModelsPricing
Sign inStart free
  • Home
  • Pricing
  • AI Models
  • Image models
  • Voice models
  • Video models
  • Rankings
  • New models
  • Model status
  • Multi-Model Chat
  • Agents
  • Computers
  • Drive
  • Automations
  • AI Gateway
  • All features →
  • LLM cost calculator
  • Token counter
  • All free tools →
  • Blog
  • Use cases
  • Comparisons
  • Best of
  • Benchmarks
  • Demos
  • Changelog
  • Help center
  • FAQ
  • Privacy
  • Compare all models
  • Support
  • idapt Code
  • Developers
  • Quickstarts
  • API reference
  • API pricing
  • CLI
  • MCP
  • Downloads
  • Desktop
  • Badges and embeds
© idapt[email protected]TermsPrivacy PolicyLegal noticeReport content
X (Twitter)
Help Center
📖

REST API

Learn more about this feature

Everything, programmable.A typed SDK and a versioned REST API over chats, files, agents, and computers.

Found this helpful? Share it:

The idapt REST API gives your code the same actions you take in the app: chats, agents, files, computers, knowledge, inference, search, and more. Any language that can make an HTTP request can call it 📖

Free and up

Base URL and authentication

Every endpoint is relative to a single base URL. Listing chats, for example, is GET https://idapt.app/api/v1/chats.

https://idapt.app/api/v1

Authenticate every request with an API key. Send it as a bearer token, or in the x-api-key header:

Authorization: Bearer uk_your_key_here
x-api-key: uk_your_key_here

Keys start with uk_. Create one under Settings → Developer. See API keys and scopes for scopes, rotation, and spend caps.

Versioning

The API uses dated versions. Send an X-Idapt-Version header to select a contract explicitly:

X-Idapt-Version: 2026-07-07

Omit the header and the request uses the version pinned to your API key. A dated version controls breaking request and response shapes. New endpoints and optional fields can appear without a new date, so pinning keeps existing code stable.

Response shapes

Every response uses one of three JSON envelopes.

A single resource

{
  "data": {
    "id": "01h0m2k3p4q5r6s7t8v9w0x1y2",
    "title": "My chat",
    "created_at": "2026-01-15T10:30:00.000Z"
  }
}

Every id and foreign-key field is a 26-character Crockford base32 resource id, never a UUID. Path parameters like /chats/{id}expect the same shape.

A list

{
  "data": [ ... ],
  "pagination": { "has_more": true, "next_cursor": "b3Blbjox..." }
}

Lists are cursor-paginated. Pass next_cursor back as the cursor query parameter for the next page. It is null when has_more is false. The limit parameter caps at 100.

An error

{
  "error": { "type": "not_found", "message": "Chat not found" }
}

Branch on type, not the wording of message. Some errors also carry an optional code with a more specific reason. See Rate limits and errors.

Field names use snake_case and timestamps are ISO 8601 strings. A delete returns { deleted, id }. Every response carries an X-Request-Id header, so quote it when you contact support. There are no idempotency keys.

Endpoints by resource

The rows below are generated from the same registry that powers the CLI and the agent tool, so they always match the live routes. Resource ids, request bodies, and per-field rules live behind each route.

Chats and agents

Chats

EndpointWhat it does
GET /chatsList chats.
GET /chats/:idGet a chat by id.
POST /chatsCreate a chat.
PATCH /chats/:idUpdate a chat (title, model, …).
DELETE /chats/:idTrash a chat.
POST /chats/:id/archiveArchive a chat.
POST /chats/:id/unarchiveUnarchive a chat.
POST /chats/:id/restoreRestore a trashed chat.
DELETE /chats/:id/permanent-deletePermanently delete a trashed chat (irreversible).
GET /chats/:id/messagesList a chat's messages.
POST /chats/:id/messagesSend a message and generate a response (long-running).
POST /chats/:id/messages/streamSend a message and stream the response as Server-Sent Events.
POST /chats/:id/runs/:run_id/retryRetry a failed run (long-running).
GET /chats/:id/runsList a chat's agent runs.
GET /chats/:id/costGet a chat's total cost.
GET /chats/:id/message-costsGet per-message and per-run cost details.
POST /chats/:id/compactCompact a chat's conversation history.
POST /chats/:id/goalStart goal mode on a chat.
GET /chats/:id/goalRead the goal governing a chat's active branch.
DELETE /chats/:id/goalEnd the active goal.
POST /chats/:id/goal/resumeRe-open an exhausted or stalled goal with a bigger cap.
POST /chats/:id/stopStop the active run in a chat.
GET /chats/:id/exportExport a chat transcript.
POST /chats/:id/copy-to-agentCopy a chat to another agent.
POST /chats/:id/copy-to-workspaceCopy a chat into another workspace.
POST /chats/:id/fork-to-workspaceFork a chat into another workspace.

Agents

EndpointWhat it does
GET /agentsList agents.
GET /agents/:idGet an agent by id.
POST /agentsCreate an agent (name, system_prompt, workspace_id, …).
PATCH /agents/:idUpdate an agent's fields.
DELETE /agents/:idTrash an agent.
POST /agents/:id/archiveArchive an agent.
POST /agents/:id/unarchiveUnarchive an agent.
POST /agents/:id/restoreRestore a trashed agent.
DELETE /agents/:id/permanent-deletePermanently delete a trashed agent (irreversible).
POST /agents/:id/moveMove an agent to another workspace.
POST /agents/:id/copy-to-workspaceCopy an agent into another workspace.

Workspaces and sharing

Workspaces

EndpointWhat it does
GET /workspacesList workspaces.
GET /workspaces/:idGet a workspace by id.
POST /workspacesCreate a workspace.
PATCH /workspaces/:idUpdate a workspace.
DELETE /workspaces/:idDelete a workspace.
POST /workspaces/:id/archiveArchive a workspace.
POST /workspaces/:id/unarchiveUnarchive a workspace.
GET /workspaces/:id/membersList workspace members.
POST /workspaces/:id/membersAdd a workspace member.
PATCH /workspaces/:id/members/:memberIdUpdate a member's role/permissions.
DELETE /workspaces/:id/members/:memberIdRemove a workspace member.
GET /workspaces/:id/invitationsList workspace invitations.
POST /workspaces/:id/invitationsInvite someone to a workspace.
DELETE /workspaces/:id/invitationsRevoke a pending workspace invitation.

Shares

EndpointWhat it does
GET /sharesList grantees on a resource.
POST /sharesShare a resource with someone.
PATCH /sharesUpdate a share's access.
DELETE /sharesRevoke a share.

Shared with me

EndpointWhat it does
GET /shared-with-meList resources others have shared with you.

There is no fork endpoint for a workspace. Use the copy verbs to duplicate resources between workspaces.

Drive

EndpointWhat it does
GET /drive/filesList files (cursor-paginated). Filter to a folder with parent_id.
GET /drive/files/:id/contentRead a file's text, with paging, tail or a regex search.
GET /drive/files/:idDownload a file's raw bytes (streamed) by id.
GET /drive/files/:id/metadataGet a file's metadata by id.
POST /drive/filesUpload a file (multipart). Provide workspace_id or parent_id.
PATCH /drive/files/:idUpdate file name/content. OCC via expected_updated_at.
DELETE /drive/files/:idTrash a file by id (recoverable with `drive restore`).
POST /drive/files/:id/restoreRestore a trashed file.
DELETE /drive/files/:id/permanent-deletePermanently delete a trashed file (irreversible).
POST /drive/files/foldersCreate-or-get a folder (idempotent).
POST /drive/files/:id/moveMove a file to a new parent_id (null = workspace root).
POST /drive/files/:id/signed-urlMint a short-lived direct link to a file's bytes.
GET /drive/files/:id/content-versionsList a file's content version history (newest first).
POST /drive/files/:id/content-versions/restoreRestore a file to a previous content version.
GET /drive/globFind files by glob pattern (e.g. **/*.ts) across the drive.
GET /drive/grepSearch file contents by regex (modes: content/files/count, ripgrep-style context).

Computers

EndpointWhat it does
GET /computersList machines you can reach - yours and your orgs' (`--owner me` for just yours, `--workspace-id` for one workspace's reachable set).
GET /computers/:idGet a computer by id.
POST /computersNot available: computers are paired from the machine itself, not created here.
PATCH /computers/:idUpdate a computer (name, …).
DELETE /computers/:idDelete a computer.
POST /computers/:id/exposuresAllow a workspace to use a machine, with a capability grant.
PATCH /computers/:id/exposures/:workspace_idReplace a workspace allowance's capability grant.
DELETE /computers/:id/exposures/:workspace_idRevoke a workspace's access to a machine.
POST /computers/:id/transferTransfer a machine to a new owner.
POST /computers/:id/local-inferenceControl a computer's local inference engine and models.
GET /computers/:id/local-inference/modelsList a computer's installed local-inference models.
POST /computers/:id/local-inference/modelsInstall a local-inference model on a computer.
DELETE /computers/:id/local-inference/models/:ollama_idRemove a local-inference model from a computer.
PATCH /computers/:id/local-inference/models/:ollama_id/mappingMap (or unmap) an installed local model to an Idapt model id.
GET /computers/:id/local-inference/operationsList a computer's local-inference operations (installs, pulls, …).
POST /computers/:id/local-inference/operations/:operation_id/cancelCancel an in-flight local-inference operation.
POST /computers/pairDaemon pair-token redemption.
POST /computers/:id/startStart a computer.
POST /computers/:id/stopStop a computer.
POST /computers/:id/rotate-credentialRotate a computer's machine credential.
POST /computers/:id/test-connectionProbe daemon connectivity.
POST /computers/:id/execRun a shell command on a computer (long-running).
POST /computers/:id/terminalManage persistent terminals on a computer.
GET /computers/:id/fs/downloadDownload a file from a computer (?path=).
POST /computers/:id/fs/uploadUpload to a computer - raw `file` bytes OR a Drive `drive_source`.
POST /computers/:id/fsFS op (list/stat/mkdir/remove).
GET /computers/:id/portsList a computer's ports.
PATCH /computers/:id/portsLabel a port.
GET /computers/:id/usersList computer users.
POST /computers/:id/usersCreate a computer user.
GET /computers/:id/users/:usernameGet a computer user.
PATCH /computers/:id/users/:usernameUpdate a computer user.
DELETE /computers/:id/users/:usernameDelete a computer user.

You cannot create a computer over the API: pair a machine with the daemon, or provision a cloud computer from the app. See Computers.

Automations

EndpointWhat it does
GET /automationsList automations.
GET /automations/cost-statsGet automation cost stats keyed by automation id.
GET /automations/:idGet an automation by id.
POST /automationsCreate an automation (cron / webhook).
PATCH /automations/:idUpdate an automation.
DELETE /automations/:idDelete an automation.
POST /automations/:id/archiveArchive an automation.
POST /automations/:id/unarchiveUnarchive an automation.
POST /automations/:id/fireFire a webhook automation using its bearer token.
POST /automations/:id/test-fireTest-fire an automation now.
GET /automations/:id/cost-statsGet one automation's cost stats.
GET /automations/:id/runsList an automation's runs.
GET /automations/runsList automation runs in a workspace.
POST /automations/:id/runs/:runId/cancelCancel a queued or cancellable automation run.
POST /automations/:id/runs/:runId/retryAdmit a new attempt for a retryable terminal run.
POST /automations/:id/rotate-secretRotate a webhook automation's secret.

See Automations and webhooks for the schedule and signed-webhook flows.

Secrets

Inference and models

Inference

EndpointWhat it does
POST /inference/textRun a one-shot LLM completion (message-based). Returns the completion inline, or an operation handle with `background: true`.
POST /inference/text/streamStream a one-shot LLM completion over SSE (token-by-token).
POST /inference/imagesGenerate an image from a prompt. Returns the saved image inline, or a handle with `background: true`.
POST /inference/videosGenerate a video as a durable operation (external clients may await it; foreground chat resumes automatically).
POST /inference/speechSynthesize speech from text (TTS). Returns the saved audio inline, or a handle with `background: true`.
POST /inference/speech/streamStream synthesized speech over SSE (audio chunks).
POST /inference/transcriptionsTranscribe audio to text (STT). Returns the transcript inline, or a handle with `background: true`.

Models

EndpointWhat it does
GET /modelsList available LLM models (id, pricing, capabilities).
GET /models/:idGet one model's pricing and capabilities by id.
GET /models/searchSearch LLM models by capability (vision, reasoning), price, capability index and context length. Filtered, sorted and paginated.

Images

EndpointWhat it does
GET /images/modelsList available image-generation models.
GET /images/models/searchSearch image models by provider/tier (filtered + paginated). Envelope: {items,total_count,offset,has_more,query,applied_filters}.

Audio

EndpointWhat it does
GET /audio/voicesList TTS voices (filter by language/gender).
GET /audio/modelsList available TTS/transcription models.
GET /audio/models/searchSearch TTS models by speed/price (sorted + paginated). Envelope: {items,total_count,offset,has_more,query,applied_filters}.
GET /audio/voices/searchSearch TTS voices by gender/language/provider (paginated). Envelope: {items,total_count,offset,has_more,query,applied_filters}.

Video

EndpointWhat it does
GET /videos/modelsList available video-generation models.
GET /videos/models/searchSearch video models by provider/mode/resolution/audio (paginated). Envelope: {items,total_count,offset,has_more,query,applied_filters}.

Operations(poll long-running and async work)

EndpointWhat it does
GET /operations/:id/awaitWait briefly for an operation transition or terminal result.
GET /operations/:idGet an async operation's status/result by id.
GET /operationsList recent async operations (filter by status).
POST /operations/:id/cancelCancel a running async operation.
GET /operations/:id/contentRetrieve a completed operation's output (file redirect or stdout).

Search and web

Search

EndpointWhat it does
GET /searchHybrid semantic + keyword search across your files, chats, messages, agents, computers, repos and notes.

Web

EndpointWhat it does
POST /web/searchSearch the web (Brave). Returns titles, urls, and snippets.
POST /web/fetchFetch a URL and return its content as clean markdown.

Notifications and realtime

Notifications

EndpointWhat it does
GET /notificationsList notifications.
GET /notifications/preferencesGet notification preferences.
PATCH /notifications/preferencesBulk update notification preferences.
GET /notifications/configGet notification config (toasts, sound, quiet hours).
PATCH /notifications/configUpdate notification config.
GET /notifications/:idGet a notification.
POST /notificationsSend a notification.
PATCH /notifications/:idUpdate a notification (mark read, …).
DELETE /notifications/:idDelete a notification.
POST /notifications/read-allMark all notifications read.

Realtime

EndpointWhat it does
POST /realtime/:channel/broadcastBroadcast an ephemeral message to a channel's subscribers.
POST /realtime/:channel/presenceRecord/refresh the caller's presence in a channel (TTL heartbeat).
GET /realtime/:channel/presenceList who is currently present in a channel.
GET /realtime/subscribeOpen an SSE stream of one or more channels' durable changes + ephemeral broadcasts.

Account

You

EndpointWhat it does
GET /meGet the current user's profile.
GET /me/usageGet usage (view=summary storage, or view=history metered calls).
GET /me/limitsGet the viewer's effective tier and session limits.

Settings

EndpointWhat it does
GET /settingsGet account preferences.
PATCH /settingsUpdate account preferences.

Subscription

API keys(create and rotate from the dashboard, not over a bearer key)

EndpointWhat it does
GET /api-keysList API keys.
POST /api-keysCreate an API key.
PATCH /api-keys/:idUpdate an API key (name/scopes).
DELETE /api-keys/:idRevoke an API key.
POST /api-keys/:id/rotateRotate an API key's secret.

AI Gateway and providers

AI Gateway

EndpointWhat it does
GET /ai-gateway/providersList the routable serving providers.
GET /ai-gateway/usagePer-model / per-provider usage breakdown.
POST /ai-gateway/routing-previewPreview the provider routing order for a model.

Provider endpoints

EndpointWhat it does
GET /ai-gateway/provider-endpointsList provider endpoints.
GET /ai-gateway/provider-endpoints/presetsList provider-endpoint presets.
POST /ai-gateway/provider-endpointsAdd a provider endpoint.
PATCH /ai-gateway/provider-endpoints/:idUpdate a provider endpoint.
DELETE /ai-gateway/provider-endpoints/:idDelete a provider endpoint.
POST /ai-gateway/provider-endpoints/:id/testTest a provider endpoint's connectivity.

Knowledge

Next steps

  • API keys and scopes: create, scope, pin, and rotate a key.

  • JavaScript SDK quickstart: call the same surface from Node or the browser.

  • Rate limits and errors: every error shape and how to handle a wall.

FAQs

Related articles

🔑

API keys and scopes

Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.

🧰

JavaScript SDK quickstart

Install @idapt/sdk, authenticate, and make your first calls from Node or the browser.

🚦

Rate limits and errors

Every error shape the API returns, what each rate limit is, and how to handle a wall in code.

Up next

API keys and scopes

Create a key, choose its scopes, pin it to an API version, rotate it, and cap what it can spend.

Was this helpful?