# APIRail FAQ

## How do I get a Claude API key on APIRail?

Sign in with Google, create a key under Dashboard → API keys, top up at least $20, then point your client at `https://api.apirail.dev`. The same key works for GPT and Gemini.

## Is APIRail compatible with the OpenAI and Anthropic SDKs?

Yes. `/v1/chat/completions`, `/v1/responses`, `/v1/messages` (+ `count_tokens`), `/v1/images/generations`, and native Gemini `/v1beta/models/{model}:generateContent`. Change the base URL and key; the rest of your code stays the same.

## How is usage priced?

Per token, at 30% of the provider's list price, with cached input billed at the cached rate. Each request's cost is rounded up to the nearest micro-dollar and shown in your usage log.

## Can I use it with Claude Code or Codex CLI?

Yes: `ANTHROPIC_BASE_URL=https://api.apirail.dev` + `ANTHROPIC_AUTH_TOKEN=ar-live-…` for Claude Code; `OPENAI_BASE_URL=https://api.apirail.dev/v1` + `OPENAI_API_KEY` for Codex CLI.

## How do I pay?

Top up your USD balance with crypto (USDT, BTC and other coins via NOWPayments), from $20. Balance does not expire. Card payment is not available yet.

## Am I charged when a request fails?

No charge when the model provider returns an error. If you cancel a stream midway, you pay for the tokens already generated.

## Can I limit what a key can spend?

Yes. Each key can have a monthly spending limit and a list of allowed models, and can be disabled at any time. Up to 20 keys per account.

## Do you store my prompts or outputs?

No. APIRail logs request metadata only (model, token counts, cost, latency, status). Prompt and response bodies are passed through and not stored.

Source: https://apirail.dev
