AKADA / API

API documentation

Create an API key, discover its models and send your first request from your own tools.

Manage API keys

Quickstart

  1. Sign in to Akada, open API keys and select a group available to your account.
  2. Create a key and set it in the current terminal. Replace the placeholder locally.
  3. List models for this key, then use an ID compatible with your client.
PowerShell
$env:AKADA_API_KEY = "YOUR_AKADA_KEY"

Keep the key in your local environment or secret store. Rotate it if it appears in a log, screenshot or repository.

Base URLs and authentication

Anthropic Messages
https://aiakada.com
x-api-key: YOUR_AKADA_KEY
anthropic-version: 2023-06-01
OpenAI-compatible clients
https://aiakada.com/v1
Authorization: Bearer YOUR_AKADA_KEY

Use the Akada API key in the request header. The sign-in password is for the workspace login.

GET /v1/models

Use the same key you will send with the model request. Copy an exact ID from data[].id to replace MODEL_ID_FROM_YOUR_KEY.

PowerShell
$headers = @{ Authorization = "Bearer $env:AKADA_API_KEY" }
(Invoke-RestMethod "https://aiakada.com/v1/models" -Headers $headers).data |
  Select-Object -ExpandProperty id

A listed model can still be temporarily unavailable. Check your assigned group, client protocol and the actual error returned by a request.

POST /v1/messages

Send a short Anthropic-format request with a model that supports Messages in your group. A successful response includes content blocks and usage fields.

PowerShell
$headers = @{
  'x-api-key' = $env:AKADA_API_KEY
  'anthropic-version' = '2023-06-01'
}
$body = @'
{
  "model": "MODEL_ID_FROM_YOUR_KEY",
  "max_tokens": 64,
  "messages": [
    {
      "role": "user",
      "content": "Reply with one sentence."
    }
  ]
}
'@
Invoke-RestMethod -Method Post -Uri 'https://aiakada.com/v1/messages' `
  -Headers $headers -ContentType 'application/json' -Body $body

Requests with a valid key and model can incur usage charges. Review the recorded request in the workspace.

OpenAI-compatible requests

POST /v1/chat/completions

Use Chat Completions for a client and model that support that protocol. Set the SDK base URL to https://aiakada.com/v1.

PowerShell
$headers = @{
  Authorization = "Bearer $env:AKADA_API_KEY"
}
$body = @'
{
  "model": "MODEL_ID_FROM_YOUR_KEY",
  "messages": [
    {
      "role": "user",
      "content": "Reply with one sentence."
    }
  ]
}
'@
Invoke-RestMethod -Method Post -Uri 'https://aiakada.com/v1/chat/completions' `
  -Headers $headers -ContentType 'application/json' -Body $body

Install the OpenAI SDK with python -m pip install openai or npm install openai. The examples read the key from the terminal environment.

example.py
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://aiakada.com/v1",
    api_key=os.environ["AKADA_API_KEY"],
)
response = client.chat.completions.create(
    model="MODEL_ID_FROM_YOUR_KEY",
    messages=[{"role": "user", "content": "Reply with one sentence."}],
)
print(response.choices[0].message.content)

POST /v1/responses

Use Responses for clients such as Codex when your group and model support that route. A Chat Completions response alone only verifies the Chat Completions path.

PowerShell
$headers = @{
  Authorization = "Bearer $env:AKADA_API_KEY"
}
$body = @'
{
  "model": "MODEL_ID_FROM_YOUR_KEY",
  "input": "Reply with one sentence."
}
'@
Invoke-RestMethod -Method Post -Uri 'https://aiakada.com/v1/responses' `
  -Headers $headers -ContentType 'application/json' -Body $body

Streaming responses

Set stream to true and read server-sent events as they arrive. This example disables cURL output buffering.

PowerShell
$body = @'
{
  "model": "MODEL_ID_FROM_YOUR_KEY",
  "max_tokens": 64,
  "messages": [
    {
      "role": "user",
      "content": "Reply with one sentence."
    }
  ],
  "stream": true
}
'@
$body | curl.exe --no-buffer --fail-with-body -sS "https://aiakada.com/v1/messages" `
  -H "x-api-key: $env:AKADA_API_KEY" -H "anthropic-version: 2023-06-01" `
  -H "Content-Type: application/json" --data-binary "@-"

Read text deltas from each event. Look for message_stop in Messages, [DONE] in Chat Completions, or response.completed in Responses.

Check the HTTP status before parsing events. A stream can fail after HTTP 200. Treat a stream without its normal completion event as incomplete and review recorded usage before retrying it.

Groups, limits and usage

  • The key’s group controls eligible model routes. Key caps and account balance can restrict usage even when a model appears in the list.
  • Context size, output limits, token limits and concurrency vary by model, group and upstream capacity. Start with a short request and raise limits only where supported.
  • Compare recorded model requests, tokens and USD usage in your account.
Open usage records →

Troubleshooting

400Invalid request
Check the model ID, endpoint, required fields and request size.
401Authentication failed
Check the Akada key and the authentication header for this endpoint. Replace an expired or revoked key.
403Request rejected
Read the error code and check group access, balance, key quota and upstream permissions.
404Route or model unavailable
Check the base URL and endpoint path. Use a model returned for the same key.
429Rate limit
Honor Retry-After when present, reduce concurrency and retry with bounded backoff. Check the error details for a quota limit.
5xxGateway or upstream error
A 503 can mean the group has no eligible upstream account. Check the error before retrying and share the request ID, if present, with your administrator.

For support, include the timestamp, endpoint, model ID, HTTP status, sanitized error and request ID if available. Remove credentials and request contents.