> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytespike.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Make your first request in under two minutes.

## 1. Get a key

1. Sign in to [console.bytespike.ai](https://console.bytespike.ai) — sign-up takes \~30 seconds (email + password, or Google).
2. Top up a few dollars at [Billing](https://console.bytespike.ai/billing). The minimum top-up is **\$5**.
3. Go to [API keys](https://console.bytespike.ai/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](/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.

<Warning>
  The plaintext is shown only at creation time. If you lose it you can either
  reveal it again from [Console → API keys](https://console.bytespike.ai/keys)
  or rotate the key to get a fresh secret. See [Authentication](/authentication).
</Warning>

## 2. Pick a protocol

ByteSpike speaks three protocols natively. Same gateway, identical
billing — pick the header your client speaks.

<Tabs>
  <Tab title="Anthropic Messages">
    ```bash theme={null}
    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?"}]
      }'
    ```
  </Tab>

  <Tab title="OpenAI Chat Completions">
    ```bash theme={null}
    curl https://llm.bytespike.ai/v1/chat/completions \
      -H "Authorization: Bearer $BYTESPIKE_API_KEY" \
      -H "content-type: application/json" \
      -d '{
        "model": "gpt-5-5",
        "messages": [{"role": "user", "content": "Hello, who are you?"}]
      }'
    ```
  </Tab>

  <Tab title="Gemini Native">
    ```bash theme={null}
    curl "https://llm.bytespike.ai/v1beta/models/gemini-3.1-pro:generateContent?key=$BYTESPIKE_API_KEY" \
      -H "content-type: application/json" \
      -d '{
        "contents": [{"parts": [{"text": "Hello, who are you?"}]}]
      }'
    ```
  </Tab>
</Tabs>

## 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`](/api-reference/account/me-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.

```diff theme={null}
- "model": "claude-sonnet-4-6",
+ "model": "gpt-5-5",
```

```diff theme={null}
- "model": "claude-sonnet-4-6",
+ "model": "deepseek-v4-pro",
```

```diff theme={null}
- "model": "claude-sonnet-4-6",
+ "model": "gemini-3-5-flash",
```

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](https://console.bytespike.ai/dosia/models) button
verifies key + group + model before you wire it into a client.

For image / video / utility endpoints, see the
[API Reference](/api-reference/overview) — the request shape per
family is documented per-endpoint.

## Next

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Sub-keys, scopes, IP allowlists.
  </Card>

  <Card title="Credits & Billing" icon="coins" href="/concepts/credits-and-billing">
    How credits convert to dollars, when failures bill (they don't), and how to read the headers.
  </Card>
</CardGroup>
