API overview

Authentication, the two parts of the AI API, and the formats each uses.

Send every request to https://ai-api.digitospace.com. The paths in this reference are relative to it, and every one starts with /v1/projects/{project}.

Authentication

Send an API key with the AI permission as a bearer token on every request:

Authorization: Bearer dsk_…

A missing, unknown, or expired key gets 401. See API keys.

Two parts

The model API works like OpenAI’s, so OpenAI’s SDKs work with it. Its answers and errors have OpenAI’s shape.

MethodPathDoesNeeds
POST/v1/projects/{project}/chat/completionsChat, streamed or notCall models
GET/v1/projects/{project}/modelsThe models you can callCall models

The management API is like every other Digitospace API: results come in data, and failures are problem documents.

MethodPathDoesNeeds
GET/v1/projects/{project}/promptsThe project’s stored promptsView usage and limits
POST/v1/projects/{project}/promptsCreate a promptA person with Developer access or more
PUT, DELETE/v1/projects/{project}/prompts/{name}Save a new version, or delete itA person with Developer access or more
GET/v1/projects/{project}/usageUsage over timeView usage and limits
GET/v1/projects/{project}/limitsThe project’s limits and this month’s unitsView usage and limits
PUT/v1/projects/{project}/limitsSet the project’s own limitA person with Developer access or more

Requests and responses

  • Request bodies are JSON, sent with Content-Type: application/json. A chat call can be up to 8 MB, and a management call up to 1 MB.
  • Fields we do not recognise are refused, so a typo never silently does nothing.
  • Times are RFC 3339 in UTC, such as 2026-09-29T10:15:00Z.
  • Every response has an X-Request-Id header. Quote it when you contact us about a call.

See Error codes for what a failure returns.

Last updated