Skip to main content

1. Get a key

  1. Sign in to console.bytespike.ai — sign-up takes ~30 seconds (email + password, or Google).
  2. Top up a few dollars at Billing. The minimum top-up is $5.
  3. Go to API keys and click Create key. Pick a routing group (claude-default for Claude models, gemini-default for Gemini, or default to route everything — see Models for what’s where).
Copy the secret value shown after creation. It looks like sk-byts-... and only displays once — store it somewhere safe.
The plaintext is shown only at creation time. If you lose it you can either reveal it again from Console → API keys or rotate the key to get a fresh secret. See Authentication.

2. Pick a protocol

ByteSpike speaks three protocols natively. Same gateway, identical billing — pick the header your client speaks.
curl https://llm.bytespike.ai/v1/messages \
  -H "x-api-key: $BYTESPIKE_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello, who are you?"}]
  }'

3. Read the quota headers

Every response — success or failure — carries the gateway’s accounting headers:
X-RateLimit-Limit: 50.00
X-RateLimit-Remaining: 42.18
X-RateLimit-Reset: 1716705600
X-Quota-Remaining-Credits: 192.40
  • X-RateLimit-Limit / Remaining / Reset — the rate-limit bucket closest to constraining you, in USD. Reset is a Unix timestamp.
  • X-Quota-Remaining-Credits — lifetime credits remaining on this key (USD; 1 USD = 1,000,000 credits). 0.00 means you’ve hit the per-key quota cap; top up at the console or raise the cap.
  • X-Org-Quota-Remaining-Credits — same, at the org wallet level, on org-owned keys.
For the actual per-call cost, hit GET /v1/usage or look at the delta in X-Quota-Remaining-Credits between two requests. Failed requests don’t bill — X-Quota-Remaining-Credits won’t move on a non-2xx.

4. Use any model behind the same key

Switching models means changing exactly one field — model. No new SDKs, no new auth flows, no new billing accounts.
- "model": "claude-sonnet-4-6",
+ "model": "gpt-5-5",
- "model": "claude-sonnet-4-6",
+ "model": "deepseek-v4-pro",
- "model": "claude-sonnet-4-6",
+ "model": "gemini-3-1-pro",
Catch: your key has to be bound to a routing group that actually serves the target model. claude-default won’t reach DeepSeek; pick the right group at key-creation time, or create a second key. The console’s Test button verifies key + group + model before you wire it into a client. For image / video / utility endpoints, see the API Reference — the request shape per family is documented per-endpoint.

Next

Authentication

Sub-keys, scopes, IP allowlists.

Credits & Billing

How credits convert to dollars, when failures bill (they don’t), and how to read the headers.