# Call Claude, GPT, Gemini and DeepSeek from one API with LLM API

LLM API's agent storefront gives you twelve chat models, among them Claude, GPT, Gemini and DeepSeek, plus three embedding models through one API. All of them bill from one prepaid credit balance by exact token usage. Each model is priced per million tokens at 5% off list price. GPT-5 Mini input costs $0.2375 per million tokens, and you buy credit once, from $0.50, by wallet or card. Register a free agent credential, buy credit, then send `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/chat/completions` with `model`, `messages`, `max_tokens` and `"stream": false`.

## At a glance

- **Endpoint:** `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/chat/completions` (OpenAI format). The same models also answer on `/zc/v1/messages` and `/zc/v1/responses`.
- **Body:** `model`, `messages`, `max_tokens`, and `stream` set to `false`
- **Price:** per million input and output tokens, set by the model. GPT-5 Mini output costs $1.90 per million tokens.
- **Payment:** prepaid credit, bought once from $0.50 ($0.50 by card) over x402, MPP or card. Each call draws its exact token usage.
- **Access:** a free agent credential, sent as `Authorization: Bearer <access token>` on every call. A call cannot be paid on its own.
- **Response:** one JSON body with `choices[0].message.content` and `usage`, plus a `zc-billing` header with `chargedUsd` and `remainingCreditUsd`
- **Full purchase flow:** [the buyer skill](https://agents.llmapi.ai/zcj/5kx6i3lopslc/SKILL.md)

## Send a chat completion to any model

1. Get a free agent credential and buy prepaid credit once, from $0.50 by wallet or $0.50 by card. [The buyer skill](https://agents.llmapi.ai/zcj/5kx6i3lopslc/SKILL.md) has each request for registering and buying.

2. Send the request. The model is GPT-5 Mini here, and any `model` value from the table below takes the same body:

   ```bash
   curl -si https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/chat/completions \
     -H "Authorization: Bearer $ACCESS_TOKEN" -H 'Content-Type: application/json' \
     -d '{"model": "gpt-5-mini", "messages": [{"role": "user", "content": "In one sentence, what does an HTTP 402 Payment Required response mean?"}], "max_tokens": 300, "stream": false}'
   ```

   The response is `200` with a JSON body holding `id`, `object`, `model`, `created`, `choices` and `usage`, which carries the token counts:

   ```json
   {"id": "req_20261027045031_7b3204af", "object": "chat.completion", "model": "gpt-5-mini", "created": 1793076631,
    "choices": [{"index": 0, "finish_reason": "stop", "message": {"role": "assistant", "content": "HTTP 402 Payment Required indicates that the server is refusing to fulfill the r…"}}],
    "usage": {"prompt_tokens": 21, "completion_tokens": 168, "total_tokens": 189, "reasoning_tokens": 128,
              "prompt_tokens_details": {"audio_tokens": 0, "cached_tokens": 0},
              "completion_tokens_details": {"reasoning_tokens": 128}}}
   ```

3. Read the reply and what it drew. The text is in `choices[0].message.content` and the token counts are in `usage`. The `zc-billing` header reports `fundingSource: "credit"`, the `chargedUsd` debited and the `remainingCreditUsd` left. The example above drew $0.000324 from prepaid credit for 21 prompt tokens and 168 completion tokens. Of those 168, 128 were reasoning tokens, which `usage` reports under `completion_tokens_details`, so leave `max_tokens` room for the reasoning as well as the reply. To check the balance later, send `GET https://agents.llmapi.ai/zcj/5kx6i3lopslc/agent/entitlements` with your bearer.

## Choose a model

Send the `model` value exactly as written below. Service slugs such as `gpt-5-2` are pricing labels, not `model` values.

| Model | `model` | Context | Input | Output |
| --- | --- | --- | --- | --- |
| Claude Opus 5 | `claude-opus-5` | 1M | $4.75 per million tokens | $23.75 per million tokens |
| Claude Sonnet 5 | `claude-sonnet-5` | 1M | $1.90 per million tokens | $9.50 per million tokens |
| GPT-5.2 | `gpt-5.2` | 400K | $1.6625 per million tokens | $13.30 per million tokens |
| GPT-5.1 | `gpt-5.1` | 400K | $1.1875 per million tokens | $9.50 per million tokens |
| GPT-5 Mini | `gpt-5-mini` | 400K | $0.2375 per million tokens | $1.90 per million tokens |
| Gemini 3.1 Pro (Preview) | `gemini-3.1-pro-preview` | 1M | $1.90 per million tokens | $11.40 per million tokens |
| Gemini 3.7 Flash | `gemini-3.7-flash` | 1M | $0.7125 per million tokens | $3.5625 per million tokens |
| DeepSeek V4 Pro | `deepseek-v4-pro` | 1M | $1.653 per million tokens | $3.306 per million tokens |
| DeepSeek V4 Flash | `deepseek-v4-flash` | 1M | $0.1805 per million tokens | $0.4845 per million tokens |
| Grok 4.6 | `grok-4.6` | 500K | $1.90 per million tokens | $5.70 per million tokens |
| Kimi K2.6 | `kimi-k2.6` | 262K | $0.9025 per million tokens | $3.80 per million tokens |
| GLM 5.3 | `glm-5.3` | 1M | $1.33 per million tokens | $4.18 per million tokens |

| Embedding model | `model` | Context per input | Input |
| --- | --- | --- | --- |
| Text Embedding 3 Large | `text-embedding-3-large` | 8K | $0.1235 per million tokens |
| Text Embedding 3 Small | `text-embedding-3-small` | 8K | $0.019 per million tokens |
| Jina Embeddings v4 | `jina-embeddings-v4` | 32K | $0.019 per million tokens |

## Request formats, embeddings and token counting

| Format | Endpoint | Required fields | Notes |
| --- | --- | --- | --- |
| OpenAI chat completions | `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/chat/completions` | `model`, `messages` | `max_tokens` caps output |
| Anthropic messages | `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/messages` | `model`, `messages`, `max_tokens` | Returned as one JSON response |
| Responses API | `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/responses` | `model`, `input` | `max_output_tokens` caps output. Synchronous only. |
| Embeddings | `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/embeddings` | `model`, `input` (text or an array of texts) | Billed on input tokens |
| Token counting | `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/zc/v1/messages/count_tokens` | `model`, `messages` | Anthropic-style. Free ($0), with your bearer and the credit plan. |

The schema for each operation is in [the API reference](https://agents.llmapi.ai/zcj/5kx6i3lopslc/openapi.json). To fetch one operation, filter the reference by path and method, for example `?path=%2Fzc%2Fv1%2Fmessages&method=post`. Each model also has its own spec at `https://agents.llmapi.ai/zcj/5kx6i3lopslc/services/<slug>/openapi.json`.

## Limits and charges

- Responses do not stream. Set `stream` to `false` or omit it. `/zc/v1/messages` rejects streaming requests, and `/zc/v1/responses` rejects background mode.
- `model` takes only the twelve chat ids above, or the three embedding ids on `/zc/v1/embeddings`.
- Nothing is charged until you pay the purchase 402. Reading the catalog and the API reference is free.
- After you pay, each call draws only its exact token usage at the model's rate. Unused credit stays on the balance. A response with no `zc-billing` header billed nothing.

## Errors

| Code | Meaning | Action |
| --- | --- | --- |
| `401 bearer_required` | The call carried no agent credential | Register, then retry with `Authorization: Bearer <token>` |
| `401 invalid_token` | The token expired or did not verify | Exchange the stored assertion at `/oauth2/token` again |
| `403 plan_required` | The credential holds no credit | Buy credit at the `purchase.url` the body lists, then retry |
| `usage_exhausted` | The credit ran out | Send `POST https://agents.llmapi.ai/zcj/5kx6i3lopslc/extend` with `{"amountUsd": "<amount>"}` and pay its 402 |
| `400 amount_below_minimum` / `amount_below_card_minimum` | The purchase amount is too small | Send at least $0.50, or $0.50 by card |
| Upstream status | The model provider returned an error | Read its body, which is passed through unchanged |

## Frequently asked questions

### Is LLM API's storefront an OpenAI-compatible API?

Yes. `/zc/v1/chat/completions` takes OpenAI-style `model` and `messages`, and `/zc/v1/responses` takes the Responses API shape. `/zc/v1/messages` takes Anthropic's Messages shape for the same twelve models.

### Can I call Claude and GPT from one API with the same request?

Yes. Change only `model`, for example from `gpt-5-mini` to `claude-sonnet-5`. The credential, the endpoint and the credit balance stay the same.

### Can I pay for a single call without buying credit?

No. Every call draws on prepaid credit held by the agent credential you send. A call without a credential answers `401 bearer_required`. A credential without credit answers `403 plan_required`.

### How much does one call cost?

Input tokens times the model's input rate plus output tokens times its output rate. On GPT-5 Mini, 10,000 input tokens and 1,000 output tokens cost $0.004275. To check input size before a call, send the request to `/zc/v1/messages/count_tokens`.

### Does the storefront support streaming?

No. Each response comes back in full as one JSON body, so set `stream` to `false` on every request.

## Keep reading

- [Buyer skill](https://agents.llmapi.ai/zcj/5kx6i3lopslc/SKILL.md): registering, buying credit and recovering access
- [Identity](https://agents.llmapi.ai/zcj/5kx6i3lopslc/auth.md): the free agent credential and claiming it
- [How to pay](https://agents.llmapi.ai/zcj/5kx6i3lopslc/payment.md): the 402, x402, MPP and card
- [API reference](https://agents.llmapi.ai/zcj/5kx6i3lopslc/openapi.json): every operation's schema
- [Catalog](https://agents.llmapi.ai/zcj/5kx6i3lopslc/manifest.json): live models, plans and prices
- [Error reference](https://agents.llmapi.ai/zcj/5kx6i3lopslc/errors.md): every error code

---

Updated 2026-10-28. All LLM API guides: https://agents.llmapi.ai/guides.md. Storefront: https://agents.llmapi.ai/zcj/5kx6i3lopslc/llms.txt.
