API reference
The Maitento API is plain HTTP and JSON. The SDKs for TypeScript, Python and C# wrap it, and every call in this reference shows the plain request too, with curl, TypeScript and Python. It is generated from the code, so it always matches what the API does. To try a call without writing any code, use the API playground: it sends the call from your browser with your API key.
- Calls by area: every call, grouped the way the SDKs group them.
- Concepts: what each part of Maitento is for, and the definition file properties.
- SDK source and READMEs: the TypeScript and Python SDKs are in
sdks/, and the .NET SDK isMaitento.Sdkon NuGet.
Base URL and authentication
Section titled “Base URL and authentication”https://api.maitento.comSend your API key in the Authorization header: the word ApiKey, your user id
and the secret, separated by spaces. The curl examples use $MAITENTO_AUTH:
export MAITENTO_AUTH="ApiKey ${MAITENTO_API_KEY/:/ }"Your tenant always comes from the key, never from the URL. Something that belongs to another tenant answers 404.
Conventions
Section titled “Conventions”- JSON in and out, with
camelCasenames. Every field is present in a response; empty ones arenull. - Ids are UUIDs. Dates are ISO 8601 in UTC. Durations are written
"hh:mm:ss"("00:05:00"is five minutes). - Names of definitions (
{name}) are unique within a namespace ({namespaceName}). - Enums are strings such as
"Finished". New values can appear, so don’t treat an unknown one as an error. - Lists of definitions come back whole. Lists of runs, builds and files are paged: pass the
nextCursorfrom one page ascursorto get the next.
Errors
Section titled “Errors”| Status | Body | Means |
|---|---|---|
| 400 | {"validationFailures": [{"errorCode", "memberName", "message"}]} | the request is invalid; branch on errorCode |
| 401 | empty | missing, wrong or expired credentials |
| 403 | empty, or {"code", "error"} | you’re signed in but not allowed (for example, a member doing an admin’s job) |
| 404 | empty | not found, or not yours |
| 409 | {"error"} | a concurrent change; read again and retry |
| 413 | {"code": "api:request-too-large", ...} | the body is too large |
| 429 | {"code": "api:rate-limited", "retryAfterSeconds"} | slow down; also sent as Retry-After |
Branch on the status and the error code, never on the message text. Error codes lists every code, what it means and what to do.
Also in the reference
Section titled “Also in the reference”- Types: every object, enum and shape the API sends and receives, with its fields and an example. Every type named in this reference links to its page.
- Error codes: every code the API answers with, by area, with its status and what to do.
- Project files: every file in a Maitento project, every property it can set, and the VS Code extension that checks them as you type.
- API playground: try any call from your browser.
Calls by area
Section titled “Calls by area”- Namespaces: 8 calls
- Models: 1 call
- Credentials: 12 calls
- Credential stacks: 11 calls
- Model keys: 4 calls
- Agents: 7 calls
- Interactions: 13 calls
- Interaction runs: 10 calls
- Apps: 8 calls
- App runs: 3 calls
- Capsules: 7 calls
- Capsule runs: 14 calls
- Code pipelines: 9 calls
- Code pipeline runs: 14 calls
- Runs (all kinds): 9 calls
- Connectors: 9 calls
- Tools: 9 calls
- Secrets: 6 calls
- Webhooks: 6 calls
- Knowledge bases (partitions): 14 calls
- Files: 8 calls
- File systems (VFS): 51 calls
- Memory (looms): 29 calls
- Automations: 19 calls
- Builds (validate and deploy): 5 calls
- Usage: 4 calls
- Users: 3 calls
- API keys: 3 calls
- Tenant settings: 5 calls
- billing: 9 calls