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.
| Method | Path | Does | Needs |
|---|---|---|---|
POST | /v1/projects/{project}/chat/completions | Chat, streamed or not | Call models |
GET | /v1/projects/{project}/models | The models you can call | Call models |
The management API is like every other Digitospace API: results come in data, and failures are problem documents.
| Method | Path | Does | Needs |
|---|---|---|---|
GET | /v1/projects/{project}/prompts | The project’s stored prompts | View usage and limits |
POST | /v1/projects/{project}/prompts | Create a prompt | A person with Developer access or more |
PUT, DELETE | /v1/projects/{project}/prompts/{name} | Save a new version, or delete it | A person with Developer access or more |
GET | /v1/projects/{project}/usage | Usage over time | View usage and limits |
GET | /v1/projects/{project}/limits | The project’s limits and this month’s units | View usage and limits |
PUT | /v1/projects/{project}/limits | Set the project’s own limit | A 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-Idheader. Quote it when you contact us about a call.
See Error codes for what a failure returns.
Last updated