camelAI Documentation

API Reference

camelRun limits: busy agents, runs, files and tools

Every limit a developer can hit on camelRun: busy agents by usage tier, run length, request sizes, files, tools, code, schedules and channels.

View as Markdown · Docs index for coding agents

Past a size limit the request is refused with a 400 or 413. Past a count or rate limit, it's a 409 or 429 with Retry-After. See Errors for what to do about each. KiB = 1,024 bytes, MiB = 1,024 KiB.

Rate limits

Past a rate limit, the API answers 429 with code: "RATE_LIMITED", Retry-After in seconds, and the limit it hit in limit: {"name": "runs", "scope": "tenant", "max": 600, "windowSeconds": 60}. The SDKs wait out Retry-After and retry. GET /v1/billing has your run limit (runsPerMinute), and the console's Billing page shows it.

Limit (limit.name)PerValue
api_requests: requests to /v1/*Client address600 a minute
agent_creates: agent creates, upserts that change their agent, and forksAccount600 a minute, against abuse only. Design around busy agents instead
runs: runs started (prompt, continue, execute), however sent: REST, SDKs, MCP, schedules, channelsAccount600 a minute; 240 on free credit
auth_requests: sign-in and OAuth requestsClient address20 a minute
  • A client address is the caller's IP address; an IPv6 address counts with the rest of its /64.
  • api_requests refills continuously. The others count in fixed windows aligned to the clock minute (UTC), so Retry-After is the time to the next window.
  • A retried request (the same request id or Idempotency-Key) answered from its record isn't a new run. An upsert whose configuration equals the agent's (the same configHash) isn't an agent create, so deploying 50 unchanged agents counts nothing. A fork counts.
  • Answers that count against agent_creates or runs carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (seconds until the window resets), and so do their 429s.
  • Transcriptions and image requests each count as a run.

Agents

LimitValue
An agent's key1 to 80 characters of A-Z a-z 0-9 _ -
Lifetime (ttlSeconds)60 seconds to 366 days, or null for until deleted. Default: until deleted with a key, 1 day without
Create body (POST /v1/agents, with initialMessages)18 MiB
Imported history (initialMessages)16 MB of JSON
systemPrompt, systemPromptAppend32,000 characters each
modelHeaders20 headers, 8 KB in all
spendLimit.usd0 to 1,000,000
context4 KB
Mounts16 per agent
Agents busy at onceBy usage tier, across the whole runtime. An agent is busy while it has a run open, running or queued; a busy agent queues more runs without another slot. A run past the limit gets 429 BUSY_AGENT_LIMIT
Tools in an agent's catalog4,096 tools and 16 MiB of schemas; at most 64 offered directly to the model, the rest reached from js_exec

Usage tiers

An account's tier comes from what it has paid for credit in total, net of refunds. Starting credit and other grants do not count. A payment moves the account up as soon as it lands. See Pricing.

TierPaid in totalAgents busy at once
Freenothing yet20
Tier 1$550
Tier 2$50100
Tier 3$250250
Tier 4$1,0001,000

GET /v1/billing has busyAgents: the limit, how many are busy now, the tier, and the next one; the console's Billing page shows the same. At the limit, a run gets 429 BUSY_AGENT_LIMIT with Retry-After, and the body's busyAgents (amounts in micro-USD):

json
{
  "error": "This account has 20 agents busy, the most its usage tier (Free) allows; retry when one finishes. $5 more of credit unlocks Tier 1: 50 busy agents (it applies once the account has paid $5 in total).",
  "code": "BUSY_AGENT_LIMIT",
  "busyAgents": { "busy": 20, "limit": 20, "source": "tier", "tier": "Free", "paid": 0, "next": { "tier": "Tier 1", "paid": 5000000, "limit": 50 } }
}

Creating agents, reading them and sending them input don't count; only runs do.

Runs and requests

LimitValue
Request id (requestId, idempotencyKey)1 to 80 characters of A-Z a-z 0-9 _ -
Settled requests kept per agent for idempotent retriesThe most recent 256
Open requests per agent (running and queued)32
Prompt body6 MiB, with inline files
textNot blank, unless the message attaches audio
metadata16 keys of 1 to 64 characters, string values of at most 512 characters
Provider retries within a turn3 attempts for overloads, rate limits, 5xx and dropped streams
Model responses in one run1,000, compaction summaries included; runLimits.maxResponses lowers it for an agent or a definition. At it, the turn stops before its next model request (stopped: "turn_limit")
How long a run may take2 hours from when it began; runLimits.maxSeconds lowers it. stopped: "turn_limit" too; send another message to continue. A turn waiting on people isn't running, and may wait for days. The SDKs have no default timeout
A quiet model streamNothing before the first token for 120 seconds (300 for a reasoning model at thinkingLevel high and up), or nothing for 45 seconds once it streams, ends the request as stalled, and it's retried. runLimits.firstTokenSeconds and runLimits.idleSeconds set an agent's own (1 to 3,600). Past every retry the run fails with model_stream_stalled
Resumes of one interrupted run2; another interruption fails it with resume_limit
Idempotency-Key header1 to 255 characters; its answer is kept for 24 hours
Stateless run body (POST /v1/runs)7 MiB, with inline files (4 MiB of files in all)
A stateless run's waitAt most 60 seconds on create, 25 on GET /v1/runs/{id}
A stateless run's retentionA day after it ends by default (retentionSeconds: 60 to 604,800), then deleted. It counts against runs per minute and busy agents, not agent creates

Files

LimitValue
Files attached to one message20
Inline (base64) file bytes in one message4 MiB in all
A file attached by URL ({url})64 MiB, fetched within 60 seconds, at most 3 redirects, public addresses only
One file256 MiB
Image the model sees natively5 MiB and 8,000 pixels a side (larger ones are described in text); sent at most 1,568 pixels a side
PDF the model sees natively16 MiB and 100 pages
Files in one model requestThe newest 100 images, up to 20 MiB as sent; 24 MiB of PDFs. Older ones are described in text
Files a run lists in its outcome100 written, 20 presented
Signed links1 second to 24 hours, default 15 minutes
A volume100,000 files, 100 snapshots and 10,000 pinned ones
Storage per account1 GB on free credit, 100 GB once you've bought credit. A write past it gets 507 STORAGE_LIMIT

Audio and images

See Voice and audio and Images.

LimitValue
One audio file transcribed25 MB and 30 minutes (413 AUDIO_TOO_LARGE, AUDIO_TOO_LONG)
Audio transcribed for one message5 files, 30 minutes in all
Audio formatsOgg (Opus, Vorbis), WebM, MP3, M4A/MP4, WAV, FLAC; others are 415 UNSUPPORTED_AUDIO
An image prompt32,000 characters
Images to edit4 per request, PNG, JPEG or WebP, 25 MB each and 50 MB in all, at most 8,000 pixels a side
Images made4 per request (n); sizes 1024x1024, 1536x1024, 1024x1536

Tools

LimitValue
A tool result the model reads32,000 characters; a longer one is saved whole (up to 700 KB) to a file the model can read
Attached tool call deadline15 seconds without an answer by default; timeoutMs from 1 second to 20 minutes
MCP server call deadlineDefault 60 seconds, at most 20 minutes
OpenAPI operation deadlineDefault 30 seconds, at most 20 minutes
ProgressEach progress report restarts a call's deadline, up to 20 minutes in all
One tool result from the SDKs1 MiB of JSON
Tool sources per definition64 MCP servers and 64 OpenAPI specs
A remote MCP server's response8 MiB
An OpenAPI spec8 MiB, at most 1,024 operations
A file in a tool's arguments4 MiB inline; a file's URL lasts 5 minutes
x_searchOne call uses grok-4.7, at most two model turns and 1,800 output tokens. From js_exec, give it timeoutMs: 150000

Code the model writes (js_exec)

LimitValue
Wall time30 seconds by default, at most 60 on self-serve accounts (timeoutMs; a longer one is cut to it)
CPU time2 seconds of executing code (time waiting on tools doesn't count)
MemoryA 128 MiB heap; reaching it ends the execution
Output32,000 characters by default, at most 128,000
Tool calls256 per script, at most 32 in flight; arguments at most 128 KiB of JSON a call, results at most 1 MiB
One fs.readFile or fs.writeFile700 KiB

People

LimitValue
How long an input waits15 minutes by default, then the runtime answers for the person; from 60 seconds to 30 days
Inputs one tool call may ask at once8
Answers in one batch (POST .../inputs)1 to 100
An input's message4,000 characters
Approvers100
ask_user1 to 4 questions, each with 2 to 4 options and a header of at most 12 characters

Sub-agents

See Multi-agent.

LimitValue
Delegation depth (delegate.maxDepth)2 by default (a parent, its children and theirs); 1–5
delegate calls in flight per run (delegate.maxParallel)4 by default, 1–16; more wait their turn
A sub-agent's spendwhat its parent's run and agent spend limits have left when it starts, as its run's spend limit; what it spent counts against both
A sub-agent's lifetimea day (86,400 s), as a scratch agent's; one named by key ({ agent }) is yours and keeps its own
A delegate task100,000 characters; inline instructions 32,000
Agents in one allowlist (delegate.agents)32; a name 1–64 letters, digits, _ and -; a description at most 1,000 characters

Sub-agents are agents: each counts against busy agents, the run rate and your spend limits like any other.

Streams and browsers

LimitValue
One SSE frame1.1 MB; a larger event arrives as event_omitted
Events buffered per agent for replayThe last 512, at most 2 MiB
Long poll wait25 seconds
Read-only subscribers32 per agent
Browser token lifetime5 to 3,600 seconds, default 900
History page (?limit=)1 to 500 messages, default 50

Schedules, channels and webhooks

LimitValue
Schedules per agent100, at most a year ahead
Repeating schedulesAt least 60 seconds apart
Schedule delivery retries3, after 1, 5 and 15 minutes; then that occurrence is skipped and recorded (failures, lastError)
Schedule body64 KiB
Channel sendersperSenderPerMinute 1 to 600 (default 10), turnsPerDay 1 to 1,000,000 (default 1,000); allow at most 1,000 senders
Channel daily turnsCount messages, and turns you start through the API or a schedule, since those also post
Channel attachments10 files a message, 25 MiB each, 100 MiB in all
Webhook endpoints16 per account
A webhook delivery10 seconds to answer; retried for up to 3 days
A rotated webhook secretKeeps signing beside the new one for 24 hours

Computers

See Computers.

LimitValue
A computer session60 to 900 seconds
A commandAt most 120 seconds, and no longer than the session has left
Daily budgetReserves the whole session time before a computer starts; resets at midnight UTC

Trace export

LimitValue
Endpoints1 per account (PUT /v1/telemetry), OTLP/HTTP only (protobuf or JSON)
Headers16, each value at most 4,096 characters
Spans waiting to be sentAt least 5,000 per account at a time; past that, new spans can be dropped
An export requestAt most 512 spans; 10 seconds to answer; 5 attempts
A content attribute (with include.content)16,384 characters, then cut

Spending

LimitValue
An agent's spend limitNew prompts are refused, and a running turn stops after the response that crossed it
Run limits1,000 model responses and 2 hours a run (see Runs and requests): stopped: "turn_limit"
An account's monthly cap402 for new runs once reached
Prepaid credit402 at a zero balance, for runs and for storing files. Free credit allows $1 of usage per hour (429 past it)