Authentication
Use an API key for the REST API. Use an API key or sign in with OAuth for the MCP server.
REST API (/v1) |
MCP server (/mcp) |
|
|---|---|---|
| API key | Yes | Yes |
| Sign in with Aiventic (OAuth) | No | Yes |
API keys
A team owner creates keys in Aiventic under Settings > Developer settings with Create key, and picks the scopes each key holds. Send the key as a bearer token:
curl "https://api.aiventic.ai/v1/model?q=WRF555SDFZ" \
-H "Authorization: Bearer aiv_sk_..."
A missing, revoked or expired key gets 401. A key without the scope an endpoint needs gets 403 with a missing-scope problem.
To try endpoints in the reference’s “Try it” panel, use a short-lived test key with only the scopes you’re testing. Don’t paste a key that holds customers:contact or jobs:triage unless that’s what you’re testing, and revoke the key when you’re done. The panel keeps the key only while the page is open and never saves it.
Scopes
| Scope | Lets the key |
|---|---|
chat |
Ask Iven, and read back or delete the chats it created |
models:read |
Find models by name or serial number |
manuals:read |
Search manuals and open cited pages |
parts:read |
Search parts, read part details and live prices |
jobs:read |
List and read jobs, checklists and triage results |
jobs:triage |
Start a job’s triage |
customers:contact |
Read job customers’ contact details. API keys only |
jobs:triageandcustomers:contacteach needjobs:readon the same key.chatand the job scopes act as a team member, so the key must be bound to one. The job scopes also need a member whose role sees jobs.- A key or connection that holds a scope its member’s role doesn’t allow gets
403with arole-not-permittedproblem. Adding the scope or reconnecting won’t help: a team owner has to change the member’s role. The scope works again once the role allows it.
Sign in with OAuth (MCP only)
AI assistants connect to https://api.aiventic.ai/mcp and sign the user in with their Aiventic account. There is no client ID or secret to register: Aiventic reads the assistant’s published client metadata. The user picks a team, reviews what the assistant may do, and approves.
An OAuth connection acts as that member and can do only what their role allows. A token sent to /v1 is refused with 401.
Errors and limits
- Errors are
application/problem+jsondocuments with atypeyou can branch on. - Too many requests get
429with aRetry-Afterheader in seconds. POST /v1/askandPOST /v1/job/{jobId}/triagetake anIdempotency-Keyheader, so a retry after a dropped connection doesn’t ask twice or start a second triage.- A retry sent while the first request with that key is still running gets
409with anidempotency-key-in-useproblem. Retry once it has finished to get its response. - The same key sent with a different request gets
422with anidempotency-key-reusedproblem. Use a new key for a new request.