The Coder Copilot Developer API lets you call AI models directly using an API key. No session cookie required — just pass your key and a prompt.
https://codercopilot.firesmasher.workers.dev
All inference endpoints require your API key. Pass it as a query parameter or as an HTTP header.
POST /v1/model/orbus-low?apikey=dak_your_key_here
x-api-key: dak_your_key_here
Keys start with dak_ and are 52 characters long. You can create up to 3 keys per account on the API Keys page.
Three models are available for the Dev API, each with its own token budget:
| Slug | Token Limit | Reset Period | Msgs/min | Best for |
|---|---|---|---|---|
| flux-plus | 200 | 12 hours | 2 | Short, precise tasks |
| orbus-low | 1500 | 12 hours | 2 | General use, longer conversations |
| nova-standard | 500 | 12 hours | 2 | Balanced quality and quota |
Token counts are approximate (≈ 1 token per 4 characters for input + output).
| Field | Type | Required | Description |
|---|---|---|---|
| message | string | Yes* | The prompt / user message to send to the model. |
| prompt | string | Yes* | Alias for message. |
* Either message or prompt is required.
curl -X POST \
"https://codercopilot.firesmasher.workers.dev/v1/model/orbus-low?apikey=dak_your_key" \
-H "Content-Type: application/json" \
-d '{"message": "What is a Cloudflare Worker?"}'{
"ok": true,
"model": "orbus-low",
"reply": "A Cloudflare Worker is a serverless JavaScript runtime…",
"usage": {
"tokensConsumed": 47,
"tokensUsed": 47,
"tokensRemaining": 1453,
"tokensLimit": 1500
}
}| Status | Error | Meaning |
|---|---|---|
| 401 | Invalid API key | Key is missing, wrong, or revoked. |
| 400 | Missing 'message' | No prompt was provided in the request body. |
| 404 | Unknown model | The model slug in the URL doesn't exist. |
| 429 | Rate limit / Token limit | You've hit the per-minute message limit or exhausted your token budget. Check retryIn / resetInMinutes in the response. |
| 502 | AI error | The upstream AI provider returned an error. |
{
"models": [
{ "slug": "flux-plus", "tokenLimit": 200, "resetHours": 12, "msgsPerMinute": 2 },
{ "slug": "orbus-low", "tokenLimit": 1500, "resetHours": 12, "msgsPerMinute": 2 },
{ "slug": "nova-standard", "tokenLimit": 500, "resetHours": 12, "msgsPerMinute": 2 }
]
}These endpoints require a valid session cookie (you must be logged in via the main Coder Copilot app), not an API key.
{ "label": "…" })
| Limit | Value | Scope |
|---|---|---|
| Messages | 2 per minute | Per API key, per model |
| Tokens (flux-plus) | 200 / 12 hours | Per API key |
| Tokens (orbus-low) | 1500 / 12 hours | Per API key |
| Tokens (nova-standard) | 500 / 12 hours | Per API key |
| API keys | 3 per account | Per user |
When you hit a limit, the API returns HTTP 429 with retryIn (seconds, for message limit) or resetInMinutes (for token limit) in the response body.
const res = await fetch(
"https://codercopilot.firesmasher.workers.dev/v1/model/orbus-low?apikey=dak_your_key",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ message: "Hello, what can you help me with?" }),
}
);
const data = await res.json();
console.log(data.reply); // AI response text
console.log(data.usage); // token consumption detailsimport requests
res = requests.post(
"https://codercopilot.firesmasher.workers.dev/v1/model/orbus-low",
params={"apikey": "dak_your_key"},
json={"message": "Hello, what can you help me with?"}
)
data = res.json()
print(data["reply"])
print(data["usage"])