API surface
Capability, authority, and protocol map for the complete generated endpoint reference.
The generated endpoint reference is the exhaustive inventory of the 314 operations registered by the engine. It is generated from the production Go route registrations; a route change makes the documentation check fail until the OpenAPI file is regenerated.
This page is the map: which family owns a capability, who may call it, and which guide explains the end-to-end task. It deliberately does not duplicate every method and path from the generated reference.
Authentication classes
| Class | Credential | Main surfaces |
|---|---|---|
| Public | none | /, /healthz, /readyz, RFC 9728 metadata, personal-connection OAuth hops |
| Tenant | machine or end-user OAuth2 token | compatibility APIs, datasets, projects, models, usage, readiness |
| User-owned | end-user OAuth2 token | conversations, memories, personal connections, agent runs, skills |
| Organization administrator | end-user token with engine-held org-admin | limits, guardrails, model grants, teams, integrations, webhooks, organization connectors |
| Application | application credential with application-admin | self-service signup, which models the application offers its tenants, the application's own model pricing, its own revenue report, the default spend caps of the organizations it owns, its guardrail policy, the chat model its memory infrastructure runs on, and the skill catalog it curates for its tenants |
| Platform administrator | operator OAuth2 token, admin session, or break-glass Basic | applications, organizations, identity, platform connectors, pricing, audit, setup backup |
| Billing service | BILLING_TOKEN | POST /v1/billing/topups only |
| Memory service | MEMORY_TOKEN | internal embeddings and reranking only |
An application credential is neither a tenant nor a platform administrator: it
reaches no organization's data, and platform-admin is stripped from every
token a tenant authorization server mints. Its surfaces are therefore
self-scoped — the credential names the application, and no path carries an
application id.
All /v1/* routes require one of these credentials except /v1/connect/start
and /v1/connect/callback. /.well-known/oauth-protected-resource is also
public. The engine serves no sign-in route of its own: clients authenticate
against the identity provider directly and present the token here.
Capability map
| Family | Surface prefixes | Authority | Task documentation |
|---|---|---|---|
| System | /, /healthz, /readyz, /v1/readiness, /v1/me | public or tenant | Health and observability, Authentication |
| Compatibility | /v1/models, /v1/chat/completions, /v1/messages, /v1/rerank | tenant; internal rerank uses memory service | OpenAI SDK, Anthropic SDK, OpenAI parameter compatibility |
| Datasets | /v1/datasets/*, /v1/me/storage | tenant; mutations follow ownership and grants; /v1/me/storage requires an end user and no role | Datasets and RAG |
| Projects | /v1/projects/* | tenant; mutations follow ownership and grants | Projects |
| Conversations and memory | /v1/conversations/*, /v1/memory/*, /v1/memories/*, /v1/instructions* | end user; reading memory settings needs no role, writing them requires org-admin; /v1/instructions is each person's own response preferences, with a billable /v1/instructions/preview | Conversations and memory |
| Agents and runs | /v1/agents/*, /v1/runs/* | end user; management follows agent ownership | Agents and runs |
| Skills | /v1/skills/* | end user; the application catalog plus the caller's own uploads and hash-bound enablements | Conversations and memory |
| Knowledge-agent run budget | /v1/agents/knowledge/policy, /v1/admin/agents/knowledge/policy, /v1/application/agents/knowledge/policy | org-admin, platform admin, or an application credential | Datasets and RAG |
| Teams | /v1/teams/* | members may read; org-admin mutates | Teams and sharing |
| Organizations | /v1/onboarding/*, /v1/orgs, /v1/org/members*, /v1/org/directory/members, /v1/org/invitations, /v1/org/machine-credentials* | end user creates; org-admin manages membership and machine credentials; /v1/org/directory/members needs only an enrolled member; /v1/onboarding/signups is application-credential | Organizations |
| Automation | /v1/schedules/*, /v1/schedule-events, /v1/webhook-* | tenant; endpoint management requires org-admin | Schedules and webhooks |
| Personal connections | /v1/integrations/*, /v1/connections/* | org-admin manages integrations; owners manage connections | Email connections |
| External MCP | /v1/mcp-servers/* | org-admin registers; users attach; /v1/mcp-servers/catalog is the member-safe read | MCP integrations |
| Deeplinq MCP | /mcp | tenant | MCP integrations |
| Models and connectors | /v1/connectors/*, /v1/org/connectors/*, /v1/model-grants/* | platform or org-admin, by prefix | Connectors |
| Billing and limits | /v1/usage*, /v1/me/usage, /v1/me/usage/tokens, /v1/limits*, /v1/billing/* | tenant, org-admin, or billing service; both /v1/me/usage* reads require an end user and no role | Credits and limits |
| Application models | /v1/application/models* | application credential; self-scoped, the credential names the application | Models and pricing |
| Application pricing | /v1/application/pricing* | application credential; self-scoped, the credential names the application | Credits and limits |
| Application usage | /v1/application/usage | application credential; self-scoped, the credential names the application | Credits and limits |
| Application organizations | /v1/application/orgs | application credential; external applications only, for an organization that already exists at their own identity provider | Bring your own identity provider |
| Application spend limits | /v1/application/orgs/{id}/limits | application credential; the credential names the application, and the organization must belong to it | Credits and limits |
| Application memory model | /v1/application/memory-model | application credential; self-scoped, the credential names the application | Conversations and memory |
| Application knowledge-agent policy | /v1/application/agents/knowledge/policy | application credential; self-scoped, the credential names the application | Datasets and RAG |
| Application skills | /v1/application/skills* | application credential; self-scoped, the credential names the application | Conversations and memory |
| Guardrails | /v1/guardrails/*, /v1/admin/guardrails/*, /v1/application/guardrails | org-admin, platform admin, or an application credential | Guardrails |
| Protected resource metadata | /.well-known/oauth-protected-resource | public; RFC 9728 pointer to the identity provider | Authentication |
| Platform administration | /v1/admin/* | platform admin | Applications, Organizations, Members |
The embedded console's browser-only /admin/api/* backend is intentionally not
part of the public API contract. It is a same-origin BFF for the shipped
console, not an integration surface.
Pagination
Inventory routes use opaque keyset cursors. Unless an endpoint says otherwise:
- omitted
limituses that surface's default; - a value below
1, above100, or non-integer is400, naming the1–100bound; - pass
next_cursorback unchanged and do not parse, compare, or synthesize it.
Out-of-range used to clamp silently (a value above 100 truncated to 100 with no
signal it happened) rather than reject. Every list surface now answers the same way:
a value outside 1–100 is a 400, not a silently-truncated 200.
Some provider-backed tools use their own opaque cursor field, such as
page_token. Treat it with the same opacity rule.
Strict query parameters
Every list endpoint rejects a query key outside its own accepted set with
400 {"error":{"type":"invalid_request","field":"<key>","message":"…"}}
naming it, rather than ignoring it. A misspelled or misremembered parameter
name is a client bug, not a silent no-op — GET /v1/admin/orgs?external_org_ref=…
(the wrong name; it's ref) used to fall through to the unfiltered listing
and answer with the first organization in sort order. There is no alias for
a wrong name: the 400 teaches the correct one instead of quietly accepting
both. Each endpoint's accepted set is its own — see that endpoint's entry in
the generated reference rather than assuming
every list shares the same limit/cursor pair (/v1/conversations takes
limit alone; /v1/admin/orgs also takes ref and status; /v1/models,
/v1/model-grants, and /v1/mcp-servers take no query parameters at all).
Conditional updates and idempotency
- Knowledge-agent policy updates return a strong
ETagand requireIf-Match; missing is428, stale or malformed is412. - Dataset and project grant writes are upserts. A create returns
201; an update or no-op repeat returns200and remains audited. - Do not retry any other mutating request unless its endpoint or task guide explicitly states that replay is safe.
Idempotency-Key — supported routes only
Exactly two routes read and honor Idempotency-Key today, both backed by the
same credit ledger:
POST /v1/billing/topups— the key is required; missing is400.POST /v1/admin/orgs/{id}/credits— the key is optional; omitted means every call credits.
On either route:
- Same key, same request body (the engine hashes the raw body bytes with
SHA-256 to compare) — a true replay. The original result is returned again,
unchanged, with an
Idempotent-Replayed: trueresponse header. This follows Stripe's convention for telling a deduped replay apart from a fresh write. - Same key, a different request body —
409{"error":{"type":"idempotency_key_reuse","message":"…"}}. The original grant is untouched; the retry is refused rather than silently discarded.
Retry with the identical bytes. The comparison is over the raw request
body, not a canonicalized or re-parsed form of it — so a re-serialized but
semantically equivalent payload (different key order, different whitespace,
25000000 vs 25000000.0) is treated as a different body and hits the
409 above. Send back the exact bytes of the original request, not a
JSON-library re-encoding of the same values. (Stripe's own idempotency
check compares request parameters, not raw bytes — this engine's raw-byte
comparison is a deliberate, stricter choice, not an oversight.)
Sending Idempotency-Key to any other native /v1 route answers 400
naming the header —
{"error":{"type":"invalid_request","field":"Idempotency-Key","message":"…"}}
— instead of silently ignoring it. A retried POST /v1/datasets with the
same key, for example, is not deduplicated: each call creates a new dataset,
and the engine now says so up front rather than leaving that gap to be
discovered by trial and error. Support for further routes is tracked on the
product roadmap, not shipped.
Exception: the OpenAI-compatible (POST /v1/chat/completions) and
Anthropic-compatible (POST /v1/messages, POST /v1/messages/count_tokens)
routes are exempt from that 400 — a drop-in SDK or proxy targeting either
dialect may attach Idempotency-Key out of habit, and the engine tolerates
it there rather than breaking compatibility. Neither route deduplicates on
it: each call still processes independently.
Error and correlation contract
Native routes return a typed JSON error. OpenAI- and Anthropic-compatible routes use their protocol's envelope. Common statuses are:
| Status | Meaning |
|---|---|
400 | Invalid request or a user-owned route called without an end user |
401 | Missing, expired, invalid, unbound, or wrongly scoped OAuth2 token |
402 | Credit balance or hard spend limit exhausted |
403 | Authenticated but not entitled; retired credential schemes also end here |
404 | Missing resource, or a forbidden resource whose existence is concealed |
409 | State, uniqueness, or identity-binding conflict |
412 | Conditional update used a stale or invalid entity tag |
413 | Request body exceeds the transport or feature limit |
428 | Required conditional header is absent |
429 | Authentication, capacity, rate, or concurrency limit reached |
502 | Upstream provider or configured collaborator failed |
503 | Required configured capability is unavailable |
Every response carries an engine-generated X-Request-ID. Preserve it in
support telemetry; it correlates the response with provider calls, billing,
audit, conversation persistence, and structured logs.
Deliberate service boundaries
/v1/embeddingsand/v1/rerankare internal memory-service surfaces, not general tenant embedding or reranking APIs./v1/billing/topupsrecords settled payment outcomes; Deeplinq does not process the payment itself./mcpexposes a read-only Deeplinq server. Tenant-registered external MCP servers are managed separately under/v1/mcp-servers/*.- Hosted login and OAuth callback routes are browser hops. They return redirects and cookies, not API tokens in JSON bodies.