camelAI Documentation

Concepts

camelRun v2 pricing, billing, and spend limits

How camelRun v2 prices active agent time ($0.05/hr), Linux containers ($0.18/hr), model tokens, starter credits, and spendLimitUsd caps.

View as Markdown

camelRun v2 is prepaid with no subscriptions, no per-seat fees, and no charges for idle agents. Your account tracks prepaid credit in USD (balanceUsd), BYOK runtime credit (infraCreditUsd), a monthly cap (monthlyCapUsd), and per-agent or per-run spendLimitUsd limits.

Pricing summary

Every run settles usage against your tenant ledger (GET /v2/billing) and daily usage table (GET /v2/usage?days=30):

ResourceRateNotes
Active agent time (agentMs)$0.05 per active agent-hour (about $0.0000139/sec)Billed per second (metered to the millisecond) while a run is actively running. Applies on BYOK runs too.
Idle, queued, parked, and approval-waiting agents$0Idle agents, queued prompts, runs waiting on human input (input_required), and runs parked on a signal (delegate/wait_agent, WebSocket tool calls, async webhook callbacks) are not billed.
Active Linux container execution (bash, vmMs)$0.00005/sec ($0.18/hr)Metered per second of active command execution (billableMs) in the Linux container (Node 24, Python 3, git, ripgrep). Container pre-warming is free.
Storage (camelFS repos & history)$0 right nowVersioned camelFS repositories and conversation history are currently unmetered.
Model tokens (BYOK)$0 from camelRunConfigure your own provider key (PUT /v2/providers/:provider or key scopes) and your provider bills you directly. Active agent time and container execution still apply.
Model tokens (platform keys)Pass-through at provider priceNo markup on direct providers. On OpenRouter, camelRun enforces Zero Data Retention (data_collection: "deny") on every request.
Web search (web_search)$0.00025 to $0.007/searchCloudflare Web Search with Ceramic (default) $0.00025, Cloudflare with Exa $0.007, Cloudflare with Linkup $0.005, direct Exa $0.007, Brave $0.005, Parallel $0.001. $0 on your own Exa, Brave, or Parallel key.
Browser (browser)$0 (Kitesurf) / $0.09/browser-hr (Chromium)Kitesurf (default engine) is $0 while in beta. Chromium bills by reported browser time. $0 on your own CDP browser endpoint.
Media and voicePass-throughImage generation (POST /v2/images, OpenAI gpt-image-2.5-flare at $5/1M text in, $8/1M image in, $30/1M image out), transcription (POST /v2/transcriptions, $0.006/min on whisper-1), speech (POST /v2/speech, $15/1M chars on gpt-4o-mini-tts and tts-1, $30/1M on tts-1-hd), and realtime voice calls (POST /v2/voice/calls, metered by audio/token usage). SVG rendering (POST /v2/images/render) is $0.

Starter trial credit and adding credit

  • Starter trial credit: Every verified sign-up (Google, GitHub, or email) gets $1.00 in free model credit gated to azure/gpt-6-luna until you add paid credit or configure your own provider key (BYOK), plus $5 in BYOK runtime credit (infraCreditUsd) that covers active agent time and Linux container execution when running on your own provider keys.
  • Buying credit: Add $5 to $1,000 at a time from run.camelai.com/console/billing or via POST /v2/billing/checkout (a 5.5% payment processing fee applies at checkout).
  • Default production model: When you omit model (or pass camelrun/default), camelRun runs azure/gpt-6.1-terra (or azure/gpt-6-luna on the $1.00 starter trial credit).

Built-in model catalog rates

Per 1 million tokens when using platform keys (GET /v2/models returns the full live list of models and rates available to your tenant):

Model IDInput (per 1M tokens)Output (per 1M tokens)
azure/gpt-6.1-terra (default)$1.00 ($2.00 above 272K input tokens)$5.00 ($7.50 above 272K input tokens)
azure/gpt-6-luna (starter trial credit)$0.10 ($0.20 above 272K input tokens)$0.50 ($0.75 above 272K input tokens)
azure/gpt-6.2-sol$2.00 ($4.00 above 272K input tokens)$10.00 ($15.00 above 272K input tokens)
openrouter/meta/muse-ember (camelrun/fast)$0.10$0.50
openrouter/google/gemini-4-carbon (camelrun/strong)$2.00$10.00
openrouter/deepseek/deepseek-v4.1-flash$0.15$0.60
anthropic/claude-sonnet-5-5$2.00$10.00
anthropic/claude-haiku-5-5$0.10 ($0.50 above 100K input tokens)$0.50 ($2.50 above 100K input tokens)
anthropic/claude-sonnet-4-0$3.00$15.00
openai/gpt-5$1.25$10.00
openai/gpt-4.1$2.00$8.00
openai/gpt-4.1-mini$0.40$1.60
gemini/gemini-4-neon$3.00$15.00
gemini/gemini-2.5-pro$1.25 ($2.50 above 200K input tokens)$10.00 ($15.00 above 200K input tokens)
gemini/gemini-2.5-flash$0.30$2.50

When you configure your own provider API key (PUT /v2/providers/:provider or a key scope), model tokens cost $0 from camelRun and are billed directly by your provider. BYOK runs still settle active agent time ($0.05/hr) and container execution ($0.00005/sec), drawing from infraCreditUsd first before touching balanceUsd.

Checking balance and usage

Call GET /v2/billing (or client.billing.get()) for your balance, remaining BYOK runtime credit, monthly cap, active agent concurrency, and recent daily breakdown:

ts
const billing = await client.billing.get();
console.log(billing.balanceUsd, billing.infraCreditUsd, billing.monthlyCapUsd, billing.usage);
json
{
  "balanceUsd": 24.85,
  "infraCreditUsd": 5.0,
  "monthlyCapUsd": 1000,
  "busyAgents": { "busy": 1, "limit": 25 },
  "usage": [
    {
      "day": "2026-12-01",
      "model": "azure/gpt-6.1-terra",
      "runsCount": 14,
      "inputTokens": 42100,
      "outputTokens": 8450,
      "vmMs": 1240,
      "agentMs": 38500,
      "costUsd": 0.084947
    }
  ]
}

For daily usage rows over 1 to 365 days, call GET /v2/usage?days=30.

Spend limits

camelRun v2 lets you cap spend at two levels:

Agent-level spendLimitUsd

Set spendLimitUsd when upserting an agent (PUT /v2/agents/:key) or update it atomically while the agent is idle with PATCH /v2/agents/:idOrKey/spend-limit:

bash
curl -X PATCH "https://run.camelai.com/v2/agents/support-user-42/spend-limit" \
  -H "Authorization: Bearer $CAMELRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"spendLimitUsd": 5, "expectedSpendLimitUsd": 10}'

Per-run spendLimitUsd

Pass spendLimitUsd on POST /v2/agents/:idOrKey/runs (agent.run(prompt, { spendLimitUsd: 0.25 })) to bound a single run:

ts
const run = await agent.run("Analyze the repository and summarize issues.", {
  whileRunning: "queue",
  spendLimitUsd: 0.25,
});

Rules for per-run spendLimitUsd:

  • When metered usage reaches spendLimitUsd, the run stops with error code spend_limit_exceeded (HTTP 402).
  • Charges from a model response or container command already in progress when the limit is crossed still count.
  • A spendLimitUsd of 0 stops the run before calling the model.
  • Queueing required: A run that supplies spendLimitUsd must use whileRunning: "queue". Passing spendLimitUsd with whileRunning: "steer" is rejected with 400 invalid_spend_limit. Steering an active run keeps the active run's existing limit.
  • Runs with spendLimitUsd execute individually even when the agent uses queue: { mode: "batch" }.

End-user billing in v2

camelRun v2 removed the built-in end-user wallet API (/v1/end-users/*). Multi-user applications track customer balances and entitlements in their own database, pass each user's remaining budget as spendLimitUsd on runs, and read run.usage.costUsd or usage.recorded webhooks to deduct customer credits. See Multi-user apps.

Adding tenant credits (self-hosted / admin)

Operators with X-Admin-Key can grant credits idempotently by refId using POST /v2/billing/credits (client.billing.addCredits({ amountUsd, refId, note, adminKey })). Reusing the same refId applies the grant only once.