# 7API — full documentation # Balance, usage, status and invoices > Check your 7API balance, usage and model health, or create a Heleket top-up invoice using your API key. These account endpoints use your API key and keep working at zero balance. Balance, usage and status reads are free; creating an invoice does not charge your balance. ## Balance `GET /v1/balance` ```bash curl https://7api.st/v1/balance -H "Authorization: Bearer $SEVENAPI_API_KEY" ``` ```json { "object": "balance", "currency": "USD", "balance_usd": 18.4213, "usage": { "windows": { "1h": { … }, "24h": { … }, "7d": { … } } }, "model_rates": { "glm-5.3": { "price_usd_per_mtok": 0.05, "cache_read_usd_per_mtok": 0.01 } } } ``` ## Usage `GET /v1/usage` Rolling totals for the last hour, 24 hours and 7 days. Each window contains: | Field | Meaning | |---|---| | `total_tokens` | All tokens: new input, cache writes, cached input and output | | `input_tokens`, `output_tokens`, `cached_tokens` | The breakdown | | `cost_usd` | Amount charged | | `cache_savings_usd` | How much less you paid because input was cached | A subkey sees only its own usage, and a main key's totals exclude its subkeys. ## Model status `GET /v1/status` Live health for every model your key can use, from the gateway's own health checks. | Field | Meaning | |---|---| | `summary.up`, `degraded`, `down` | How many models are in each state | | `models[].status` | `up`, `degraded`, `down` or `unknown` | | `models[].availability_pct` | Recent success rate | | `models[].avg_latency_s` | Recent average response time | The [dashboard's Status page](https://7api.st/status) shows the same data. ## OpenAI-style billing endpoints Some dashboards and balance widgets read OpenAI's billing endpoints. Both are available, with or without the `/v1` prefix: - `GET /v1/dashboard/billing/credit_grants` returns `total_available`, `total_used` and `total_granted` in USD. - `GET /v1/dashboard/billing/subscription` returns `hard_limit_usd`, which equals your balance. ## Create a Heleket invoice `POST /v1/payments/heleket` ```bash curl https://7api.st/v1/payments/heleket \ -H "Authorization: Bearer $SEVENAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"amount_usd": 5}' ``` Send `amount_usd` as a number: **5, 10, 25, 50, 100, 200, or 500**. These are the same top-up packages and bonuses offered by the bot and website. No other body fields are accepted. The bearer key selects the account that receives the credit; native reseller subkeys fund their own balance. Provider-pinned and token-capped keys cannot create wallet invoices. The HTTP 200 response contains: | Field | Meaning | |---|---| | `invoice_id` | The Heleket invoice UUID | | `payment_url` | The HTTPS checkout URL returned by Heleket | | `amount_usd` | The requested payment amount | | `currency` | `USD` | | `credit_usd` | Balance credited after payment, including the package bonus | Repeated requests for the same account and amount reuse a pending invoice for up to one hour. Credit is added only after the existing signed webhook and provider confirmation verify payment. An API timeout does not mean that an invoice was never created; retry the same request to recover it. Invalid amounts or extra fields return `400`; invalid keys return `401`; unsupported key types return `403`; excess requests return `429`. Provider failures return `502` or `503`. Respect `Retry-After` when present. ## Rate limits Read endpoints share a limit of 600 requests per minute per IP address with `GET /v1/models`. Invoice requests allow 60 requests per minute per account, with at most three newly created invoices per ten minutes and three pending invoices. Reusing an existing invoice does not create another one. --- # Account and key security > How 7API accounts work. The API key is the login with no email or password, so this page covers how to store it safely, rotate a leaked key and use subkeys to limit exposure. A 7API account has no email address or password. **Your API key is your login.** This means you can sign up in seconds without sharing personal details. It also means a lost key can't be recovered, and a leaked key can be used by anyone until you rotate it. ## Store the key safely - Keep it in a password manager or an environment variable, not in source code. - Never commit it to git. Add `.env` to `.gitignore`. - If the dashboard offers to download the key at signup, keep that file somewhere private. The dashboard remembers your key in this browser so you stay signed in. Signing out clears it from the browser. ## If a key leaks Open **Overview → Rotate** in the [dashboard](https://7api.st/), or use the Telegram bot. You'll get a new key, and the old one stops working as soon as you confirm. Your balance and history stay with the account. Then update every tool that used the old key. ## Limit the damage - Use a [subkey](https://7api.st/docs/subkeys) with a small balance for each app, server or person, instead of sharing the main key. A leaked subkey can spend at most what's on it, and you can revoke it instantly. - Watch spending on the dashboard's [Usage page](https://7api.st/usage) or with `GET /v1/usage`. ## Telegram accounts Accounts created in the Telegram bot can also use the website. Sign in there with the key that `/profile` shows. If you created your account on the website, open a private chat with [@hqclaudebot](https://t.me/hqclaudebot) and send `/link ` using your website API key. The bot shows both balances before you confirm. Once linked, `/profile`, `/usage`, `/buy`, `/referral` and `/regenerate` use your website account. If your Telegram account already has funds, choose **Link + transfer** to move its current balance into the website account, or **Link only** to keep the balances separate. The bot shows both balances before confirmation. A transfer moves credit only; usage history and referral earnings stay with their original accounts. Finish active API requests before transferring. Your original Telegram key keeps working. Use `/unlink` to return to that account; unlinking does not reverse a transfer. Your website key and remaining balance are always available on the site. You can link the website account again later. A website account can be linked to one Telegram account at a time. ## Reporting a security issue Send security reports to [support on Telegram](https://t.me/ogsadly). Please don't test against other customers' accounts. --- # Anthropic-compatible API > 7API's Anthropic Messages API at https://7api.st/v1/messages. Works with the Anthropic SDK and Claude Code, supports streaming, tools, extended thinking, prompt caching and token counting for every model. 7API implements the Anthropic **Messages API**. The Anthropic SDKs, Claude Code and other Anthropic-format clients work unchanged once you set the base URL and key. Non-Claude models (GLM, DeepSeek, Kimi, GPT, Grok, Gemini) are reachable on this format too. ```text Base URL: https://7api.st (no /v1 — the SDK adds /v1/messages) Header: x-api-key: sk-your-key (Authorization: Bearer also works) ``` ## Messages `POST /v1/messages` ```bash curl https://7api.st/v1/messages \ -H "x-api-key: $SEVENAPI_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Explain a mutex in one paragraph."}] }' ``` ```python from anthropic import Anthropic client = Anthropic(base_url="https://7api.st", api_key="sk-your-key") msg = client.messages.create( model="claude-opus-5-5", max_tokens=2048, system="You are a senior reviewer.", messages=[{"role": "user", "content": "Review: def add(a,b): return a-b"}], ) print(msg.content[0].text, msg.usage) ``` ### Supported features | Feature | Notes | |---|---| | `system`, `messages`, `max_tokens` | `max_tokens` defaults to 16,384 if omitted. The maximum is 131,072. | | `stream: true` | Standard Anthropic SSE events. See [Streaming](https://7api.st/docs/streaming). | | `tools`, `tool_choice` | Tool use on every model | | `thinking` | Adaptive thinking on Claude models. `{"type":"enabled","budget_tokens":N}` is accepted on `claude-opus-4-6` only. | | `output_config.effort` | Claude Code's effort control. See [Reasoning effort](https://7api.st/docs/reasoning-effort). | | `cache_control` | Passed through. See [Prompt caching](https://7api.st/docs/prompt-caching). | | Images | `image` content blocks on vision models | | `anthropic-beta` | Forwarded. `context-1m-2025-08-07` is added automatically for `[1m]` model names. | `POST /v1/messages/streaming` is an alias that always streams. ### Usage fields ```json "usage": { "input_tokens": 12, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 48211, "output_tokens": 377 } ``` As at Anthropic, `input_tokens` excludes cached tokens. Billing is described in [Prompt caching](https://7api.st/docs/prompt-caching). ## Count tokens `POST /v1/messages/count_tokens` takes the same body as `/v1/messages` and returns `{"input_tokens": N}`. The count is a fast local estimate, and it's free. It still needs a positive balance, like other generation endpoints. Claude Code calls this endpoint before compacting a conversation. ## Using non-Claude models Send any catalog ID as `model`: ```bash curl https://7api.st/v1/messages \ -H "x-api-key: $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "glm-5.3", "max_tokens": 512, "messages": [{"role": "user", "content": "hi"}]}' ``` Clients that only accept model names beginning with `claude-` can add that prefix to any model, for example `claude-glm-5.3` or `claude-gpt-6.1-sol`. See [Model IDs](https://7api.st/docs/model-ids). ## Errors Generation errors on this endpoint use Anthropic's shape: ```json { "type": "error", "error": { "type": "overloaded_error", "message": "…" } } ``` See [Errors](https://7api.st/docs/errors) for every status code. --- # Authentication > Authenticate to the 7API API with an Authorization Bearer header or an x-api-key header. Key format, error responses, key rotation and subkeys. Every API request is authenticated with your 7API key. The gateway accepts either of two headers. Use whichever your client sends by default. | Header | Typical client | |---|---| | `Authorization: Bearer sk-…` | OpenAI SDKs, most OpenAI-compatible tools | | `x-api-key: sk-…` | Anthropic SDKs, Claude Code | If a request carries both, `x-api-key` wins. No other header or query parameter is read. In particular, `?key=` in the URL does not work. ```bash curl https://7api.st/v1/models -H "Authorization: Bearer sk-your-key" curl https://7api.st/v1/models -H "x-api-key: sk-your-key" ``` ## Key format Keys are `sk-` followed by 48 lowercase hexadecimal characters, 51 characters in total. Treat a key like a password. It authorizes spending from your balance, and on the website it also acts as your login. ## Missing or invalid keys The generation endpoints check the key before reading the request body. A bad key gets an immediate `401` in Anthropic error format: ```json { "error": { "type": "authentication_error", "message": "Invalid API key" } } ``` The account endpoints (`/v1/balance`, `/v1/usage`, `/v1/status`, `/v1/subkeys`) answer in OpenAI error format: ```json { "error": { "message": "Invalid API key", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" } } ``` `GET /v1/models` works without a key and returns the public catalog. With a key, it returns the models available to that account. ## Rotating a key Rotate your key from **Overview → Rotate** in the dashboard, or with the Telegram bot. The site shows the new key and asks you to confirm you've saved it. Only then does the old key stop working. Update every tool that used the old key. Your balance and usage history stay with the account. ## Keys for other people Don't share your main key. Create a [subkey](https://7api.st/docs/subkeys) instead: a separate key funded from your balance, with its own spend tracking, that you can drain or revoke at any time. ## Browser use The API sends `Access-Control-Allow-Origin: *`, so requests from a browser work. Calling the API directly from a public web page exposes your key to every visitor, though. Route browser traffic through your own backend, or give each user a low-balance subkey. --- # Errors > Every HTTP status the 7API API returns (400, 401, 402, 403, 404, 413, 415, 429, 5xx), what each means and whether to retry, with the JSON error shapes for OpenAI and Anthropic clients. Errors come back as JSON with an HTTP status code. The `error.type` and `error.message` fields are always present. ```json { "error": { "type": "insufficient_balance", "message": "Out of balance. Top up via the Telegram bot." } } ``` When the failure happened at an upstream provider, the body follows the format of the endpoint you called. Chat Completions and Responses get `{"error": {"message", "type", "code", "param"}}`. Messages gets `{"type": "error", "error": {"type", "message"}}`. The message may end with `Reference code: …`. Include that code if you contact support. ## Status codes | Status | Meaning | What to do | |---|---|---| | **400** | The request is invalid: malformed JSON, a missing or overlong `model` (max 128 characters), an out-of-range `max_tokens`, conflicting output-limit fields, an unsupported effort value, a model not available on this format, or a prompt longer than the model's context window (`context_length_exceeded`). | Fix the request. Don't retry it unchanged. | | **401** | The API key is missing or invalid. | Check the header and key. See [Authentication](https://7api.st/docs/authentication). | | **402** | `insufficient_balance`. Either the balance is zero, or this request's worst-case cost (input plus the full `max_tokens`) is more than the remaining balance. | Top up, or lower `max_tokens`. | | **403** | `permission_denied`: the key can't use this model. An upstream safety block can also return 403 `permission_error`. | Use another model, or rephrase. | | **404** | Unknown endpoint, or a model that is retired or temporarily unavailable (`model_unavailable`). | Check the path and the [model list](https://7api.st/pricing). | | **405 / 415** | Wrong HTTP method, or the body isn't JSON (`Content-Type` must be `application/json`). | Use POST with a JSON body. | | **413** | The request body is larger than 25 MB. | Send fewer or smaller images, or trim the history. | | **429** | A [rate limit](https://7api.st/docs/rate-limits) was hit (`rate_limit_error`), or the upstream is busy. | Wait for the `Retry-After` header, then retry with backoff. | | **500** | Internal error | Retry with backoff. | | **502 / 503** | No upstream could serve the request right now (`overloaded_error` on Anthropic format), or the gateway is briefly busy. | Retry with backoff. Check [status](https://7api.st/status) if it persists. | ## Retry policy Retry `429`, `500`, `502`, `503` and `504` with exponential backoff and jitter, honoring `Retry-After` when it's present. Don't retry other `4xx` errors unchanged. The gateway already fails over between upstream providers before it returns an error. A 5xx means that failover was also exhausted, so waiting a little before retrying helps more than retrying immediately. ## Billing on errors A request that fails without delivering any output isn't charged. If a stream fails partway, you pay only for the tokens that were delivered. --- # Use Claude Code with 7API > Configure Claude Code to use 7API. Set ANTHROPIC_BASE_URL to https://7api.st in settings.json, then switch between Claude, GPT, GLM, DeepSeek, Kimi and Grok models with /model. Claude Code speaks the Anthropic Messages API, so it connects to 7API with two settings: the base URL and your key. You don't need an Anthropic account. ## Configure Save this as your Claude Code settings file and replace `YOUR_7API_KEY` with your key: - **macOS / Linux:** `~/.claude/settings.json` - **Windows:** `%USERPROFILE%\.claude\settings.json` ```json title="settings.json" { "env": { "ANTHROPIC_BASE_URL": "https://7api.st", "ANTHROPIC_AUTH_TOKEN": "YOUR_7API_KEY", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1", "CLAUDE_CODE_ATTRIBUTION_HEADER": "0", "DISABLE_TELEMETRY": "1", "DISABLE_ERROR_REPORTING": "1", "DISABLE_AUTOUPDATER": "1", "DISABLE_BUG_COMMAND": "1", "DISABLE_COST_WARNINGS": "1", "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1" }, "permissions": { "defaultMode": "auto" }, "model": "opus[1m]", "effortLevel": "high", "theme": "dark" } ``` Then run `claude`. The `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` and `DISABLE_*` entries turn off telemetry and background calls that would otherwise spend tokens. If you'd rather use environment variables for a single session: ```bash export ANTHROPIC_BASE_URL="https://7api.st" export ANTHROPIC_AUTH_TOKEN="sk-your-key" claude ``` ## Switching models `/model` accepts any 7API model. Claude Code only shows names that start with `claude-`, so add that prefix to non-Claude models: ```text /model claude-opus-5-5 /model claude-gpt-6.1-sol /model claude-glm-5.3 /model claude-deepseek-v4.1-flash /model claude-kimi-k3 /model claude-grok-4.7 ``` The `[1m]` suffix (for example `opus[1m]`) turns on the 1M-token context window on Claude models. ## Effort `effortLevel` in settings, or `/effort` in a session, is sent as `output_config.effort`. See [Reasoning effort](https://7api.st/docs/reasoning-effort) for what each model accepts. ## Troubleshooting - **401 Invalid API key:** make sure `ANTHROPIC_AUTH_TOKEN` (not `ANTHROPIC_API_KEY`) holds the 7API key. Also check that no other Anthropic key is set in your shell. - **404 errors:** the base URL must be `https://7api.st`, without `/v1`. - **402 errors:** your balance is too low for the request's worst case. Top up, or start a fresh session with less context. --- # Use Codex CLI with 7API > Configure OpenAI Codex CLI to use 7API through the Responses API. A config.toml for GPT-6 Astra, GPT-6.1 Sol and GPT-6 Luna with 1.05M-token context and auto-compaction. [Codex CLI](https://developers.openai.com/codex/) uses the OpenAI Responses API, which 7API supports natively. You don't need an OpenAI account. ## Configure Save this as: - **macOS / Linux:** `~/.codex/config.toml` - **Windows:** `%USERPROFILE%\.codex\config.toml` Replace `YOUR_7API_KEY` with your key, then run `codex`. ```toml title="config.toml" # GPT-6 Astra: 1.05M context, auto-compacts at 900K (leaves room for 128K output). # gpt-6.1-sol and gpt-6-luna use the same limits. model = "gpt-6-astra" model_provider = "7api" model_reasoning_effort = "high" approval_policy = "never" model_context_window = 1050000 model_auto_compact_token_limit = 900000 [model_providers.7api] name = "7api" base_url = "https://7api.st" wire_api = "responses" experimental_bearer_token = "YOUR_7API_KEY" [windows] sandbox = "elevated" ``` ## Choosing a model The default is `gpt-6-astra`. To use another model, change the `model` value: | Model | Rate per 1M tokens (standard / cached) | |---|---| | `gpt-6-astra` | $0.65 / $0.06 | | `gpt-6.1-sol` | $0.15 / $0.04 | | `gpt-6-luna` | $0.05 / $0.01 | All four have a 1,050,000-token context window. The config compacts the conversation at 900,000 tokens so there's room left for output. ## Notes - `model_reasoning_effort` accepts `low`, `medium`, `high`, `xhigh` and `max`. - `approval_policy = "never"` lets Codex run commands without asking. Change it to `"on-request"` if you want to approve each one. - See OpenAI's [configuration reference](https://developers.openai.com/codex/config-reference/) for the other options. --- # Use CommandCode with 7API > Connect CommandCode to 7API with /connect and BYOK. Models are discovered automatically from https://7api.st/v1. CommandCode reads `GET /v1/models`, so every 7API model appears automatically. The steps are the same on Windows, macOS and Linux. 1. Open CommandCode and enter `/connect`. 2. Choose **BYOK**. When asked for **Provider ID**, enter `7api.st`. 3. Choose **OpenAI**. 4. Paste `https://7api.st/v1` as the URL. 5. Paste your 7API key. 6. Pick a model from the list and start chatting. --- # Cursor setup no longer works > Cursor has patched cursor-byok, and this setup no longer works. Use another harness, such as OpenCode, Oh My Pi (OMP), or another compatible client. Previous steps are kept only for historical reference. > **No longer works:** Cursor has patched `cursor-byok`, and this setup no longer works. Use another harness, such as **[OpenCode](https://7api.st/docs/guides/opencode)**, **[Oh My Pi (OMP)](https://7api.st/docs/guides/oh-my-pi)**, or another compatible client. Do not follow the steps below; they are kept only for historical reference. Cursor's built-in custom-model settings don't support every request format. The previous setup used the open-source [cursor-byok](https://github.com/leookun/cursor-byok) helper to connect Cursor to 7API. ## Previous setup (for reference) 1. Install Cursor. Download cursor-byok for your OS from its [releases page](https://github.com/leookun/cursor-byok/releases) and follow its setup guide. 2. Open **Model Settings** in cursor-byok. For each model you want, enter: - **Base URL / Server address:** `https://7api.st/v1` - **API key:** your 7API key - **Model type**, **request protocol** and **model ID** from the table below 3. Keep **full URL mode** off. 4. Test the model, start the cursor-byok service, then fully quit and reopen Cursor. Start a new chat and select your model. | Model family | Model type | Request protocol | Example model ID | |---|---|---|---| | Claude | Anthropic | Messages (automatic, no setting) | `claude-opus-5-5` | | GPT | OpenAI | Responses API | `gpt-6-astra`, `gpt-6.1-sol`, `gpt-6-luna` | | Grok, GLM, DeepSeek, Kimi, Gemini | OpenAI | Chat Completions | `grok-4.7`, `glm-5.3`, `kimi-k3` | Any ID from the [model list](https://7api.st/pricing) works. --- # Use Oh My Pi (OMP) with 7API > A models.yml for Oh My Pi with every 7API model, its context limits, the right request format per model and its reasoning-effort scale. ## Install ```bash curl -fsSL https://omp.sh/install | sh ``` ## Configure Save the file below as: - **macOS / Linux:** `~/.omp/agent/models.yml` - **Windows:** `%USERPROFILE%\.omp\agent\models.yml` Replace `YOUR_7API_KEY` with your key, then launch `omp` and pick a model with `/model`. ```yaml title="models.yml" providers: 7api: baseUrl: https://7api.st/v1 api: openai-completions auth: apiKey apiKey: "YOUR_7API_KEY" models: - id: gpt-6-astra name: GPT-6 Astra api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6.2-astra name: GPT-6.2 Astra api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6.1-sol name: GPT-6.1 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6.2-sol name: GPT-6.2 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6-sol name: GPT-6 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6-luna name: GPT-6 Luna api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-5.6-sol name: GPT-5.6 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: gpt-5.6-terra name: GPT-5.6 Terra api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: gpt-5.6-luna name: GPT-5.6 Luna api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: gpt-5.5 name: GPT-5.5 api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh] } contextWindow: 1000000 maxTokens: 128000 - id: claude-fable-5-2 name: Claude Fable 5.2 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-5-5-max name: Claude Opus 5.5 Max api: anthropic-messages input: [text, image] reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: claude-opus-5-5 name: Claude Opus 5.5 api: anthropic-messages input: [text, image] reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: claude-opus-5 name: Claude Opus 5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-4-8 name: Claude Opus 4.8 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-4-7 name: Claude Opus 4.7 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-4-6 name: Claude Opus 4.6 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-sonnet-5-5 name: Claude Sonnet 5.5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-sonnet-5 name: Claude Sonnet 5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-haiku-5-5 name: Claude Haiku 5.5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: gemini-4-carbon name: Gemini 4 Carbon reasoning: true contextWindow: 1048576 maxTokens: 16384 - id: gemini-4-argon name: Gemini 4 Argon reasoning: true contextWindow: 128000 maxTokens: 16384 - id: deepseek-v4-flash-0731 name: DeepSeek V4 Flash reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash name: DeepSeek V4.1 Flash reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017 name: DeepSeek V4.1 Flash 1017 input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017-hq name: DeepSeek V4.1 Flash 1017 HQ input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017-abliterated name: DeepSeek V4.1 Flash 1017 Abliterated reasoning: true thinking: { mode: effort, efforts: [low, high, max], defaultLevel: high } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017-abliterated-fast name: DeepSeek V4.1 Flash 1017 Abliterated Fast input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4-pro-0813 name: DeepSeek V4 Pro reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: mimo-v2.6-pro name: MiMo V2.6 Pro reasoning: true contextWindow: 600000 maxTokens: 65536 - id: mimo-v2.6-flash name: MiMo V2.6 Flash reasoning: true contextWindow: 600000 maxTokens: 65536 - id: kimi-k3 name: Kimi K3 reasoning: true thinking: { mode: effort, efforts: [low, high, max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: kimi-k3.1-pro name: Kimi K3.1 Pro input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, high, max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 32000 - id: grok-4.7 name: Grok 4.7 reasoning: true contextWindow: 500000 maxTokens: 65536 - id: grok-4.6 name: Grok 4.6 reasoning: true contextWindow: 500000 maxTokens: 65536 - id: grok-4.5 name: Grok 4.5 reasoning: true contextWindow: 200000 maxTokens: 64000 7api-glm: baseUrl: https://7api.st/v1 api: openai-completions apiKey: "YOUR_7API_KEY" compat: supportsReasoningEffort: true thinkingFormat: openai reasoningContentField: reasoning_content models: - id: glm-5.2 name: GLM-5.2 reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3 name: GLM-5.3 reasoning: true thinking: { mode: effort, efforts: [low, high, xhigh, max], defaultLevel: high, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-uncensored name: GLM-5.3 Uncensored reasoning: true thinking: { mode: effort, efforts: [max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-flash name: GLM-5.3 Flash reasoning: true thinking: { mode: effort, efforts: [low, high, xhigh, max], defaultLevel: high, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-flash-uncensored name: GLM-5.3 Flash Uncensored reasoning: true thinking: { mode: effort, efforts: [max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-abliterated name: GLM-5.3 Abliterated reasoning: true thinking: { mode: effort, efforts: [high, xhigh, max], defaultLevel: high, requiresEffort: true } contextWindow: 1000000 maxTokens: 130000 ``` ## Effort Run `/effort` to see the selected model's reasoning levels, `/effort high` to pick one, or **Shift+Tab** to cycle through them. The file gives each model its supported effort range and the request format it works best with: Responses for GPT, Messages for Claude, and Chat Completions for the rest. To check what OMP loaded, run `omp models ls 7api --json`. --- # Use OpenCode with 7API > A ready-made opencode.json for 7API with every model, its context window, output limit and reasoning-effort variants. Works with GPT, Claude, GLM, DeepSeek, Kimi and Grok. The configuration below registers every public 7API model in [OpenCode](https://opencode.ai), with correct context windows, output limits, image support and effort variants. It's the same file the dashboard and Telegram bot generate, except that the dashboard fills in your key for you. ## Configure 1. Save the file below as: - **macOS / Linux:** `~/.config/opencode/opencode.json` - **Windows:** `%USERPROFILE%\.config\opencode\opencode.json` 2. Replace `YOUR_7API_KEY` with your key. It appears once per provider block. 3. Run `opencode` and pick a model with `/models`. ```json title="opencode.json" { "$schema": "https://opencode.ai/config.json", "model": "7api/gpt-6.1-sol", "small_model": "7api/gpt-6-luna", "provider": { "7api": { "npm": "@ai-sdk/openai", "name": "7API — GPT", "options": { "baseURL": "https://7api.st/v1", "apiKey": "YOUR_7API_KEY" }, "models": { "gpt-6-astra": {"name":"GPT-6 Astra","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6.2-astra": {"name":"GPT-6.2 Astra","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6.1-sol": {"name":"GPT-6.1 Sol","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6.2-sol": {"name":"GPT-6.2 Sol","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6-sol": {"name":"GPT-6 Sol","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6-luna": {"name":"GPT-6 Luna","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.6-sol": {"name":"GPT-5.6 Sol","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.6-terra": {"name":"GPT-5.6 Terra","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.6-luna": {"name":"GPT-5.6 Luna","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.5": {"name":"GPT-5.5","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}} } }, "7api-claude": { "npm": "@ai-sdk/anthropic", "name": "7API — Claude", "options": { "baseURL": "https://7api.st/v1", "apiKey": "YOUR_7API_KEY" }, "models": { "claude-fable-5-2": {"name":"Claude Fable 5.2","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-5-5-max": {"name":"Claude Opus 5.5 Max","limit":{"context":1000000,"output":128000},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-5-5": {"name":"Claude Opus 5.5","limit":{"context":1000000,"output":128000},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-5": {"name":"Claude Opus 5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-4-8": {"name":"Claude Opus 4.8","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-4-7": {"name":"Claude Opus 4.7","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-4-6": {"name":"Claude Opus 4.6","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive"},"effort":"low"},"medium":{"thinking":{"type":"adaptive"},"effort":"medium"},"high":{"thinking":{"type":"adaptive"},"effort":"high"},"max":{"thinking":{"type":"adaptive"},"effort":"max"}}}, "claude-sonnet-5-5": {"name":"Claude Sonnet 5.5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-sonnet-5": {"name":"Claude Sonnet 5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-haiku-5-5": {"name":"Claude Haiku 5.5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}} } }, "7api-other": { "npm": "@ai-sdk/openai-compatible", "name": "7API — Other", "options": { "baseURL": "https://7api.st/v1", "apiKey": "YOUR_7API_KEY" }, "models": { "gemini-4-carbon": {"name":"Gemini 4 Carbon","limit":{"context":1048576,"output":16384},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "gemini-4-argon": {"name":"Gemini 4 Argon","limit":{"context":128000,"output":16384},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "glm-5.2": {"name":"GLM-5.2","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3": {"name":"GLM-5.3","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-uncensored": {"name":"GLM-5.3 Uncensored","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-flash": {"name":"GLM-5.3 Flash","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-flash-uncensored": {"name":"GLM-5.3 Flash Uncensored","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-abliterated": {"name":"GLM-5.3 Abliterated (100% Uncensored)","limit":{"context":1000000,"output":130000},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"high"},"variants":{"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "deepseek-v4-flash-0731": {"name":"DeepSeek V4 Flash","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash": {"name":"DeepSeek V4.1 Flash","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash-1017": {"name":"DeepSeek V4.1 Flash 1017","limit":{"context":1000000,"output":65536},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash-1017-hq": {"name":"DeepSeek V4.1 Flash 1017 HQ","limit":{"context":1000000,"output":65536},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash-1017-abliterated": {"name":"DeepSeek V4.1 Flash 1017 Abliterated","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"high"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"high":{"reasoningEffort":"high"},"max":{"reasoningEffort":"max"}}}, "deepseek-v4.1-flash-1017-abliterated-fast": {"name":"DeepSeek V4.1 Flash 1017 Abliterated Fast","limit":{"context":1000000,"output":65536},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4-pro-0813": {"name":"DeepSeek V4 Pro","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "mimo-v2.6-pro": {"name":"MiMo V2.6 Pro","limit":{"context":600000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "mimo-v2.6-flash": {"name":"MiMo V2.6 Flash","limit":{"context":600000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "kimi-k3": {"name":"Kimi K3","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"max"},"variants":{"low":{"reasoningEffort":"low"},"high":{"reasoningEffort":"high"},"max":{"reasoningEffort":"max"}}}, "kimi-k3.1-pro": {"name":"Kimi K3.1 Pro","limit":{"context":1000000,"output":32000},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"max"},"variants":{"low":{"reasoningEffort":"low"},"high":{"reasoningEffort":"high"},"max":{"reasoningEffort":"max"}}}, "grok-4.7": {"name":"Grok 4.7","limit":{"context":500000,"output":65536}}, "grok-4.6": {"name":"Grok 4.6","limit":{"context":500000,"output":65536}}, "grok-4.5": {"name":"Grok 4.5","limit":{"context":200000,"output":64000}} } } } } ``` ## Notes - Models are grouped into providers by family. GPT is under `7api`, and other families are under providers such as `7api-other`. Each provider uses the request format that works best for that family. - Cycle effort variants with **Ctrl+T**. Kimi models default to `max`, and the GLM abliterated models default to `high`. - `deepseek-v4.1-flash-1017`, `deepseek-v4.1-flash-1017-hq` and `kimi-k3.1-pro` accept image attachments. - When the catalog changes, download a fresh config from the [dashboard](https://7api.st/setup/opencode/linux) and replace the file. --- # Use Cline, Roo Code and Continue with 7API > Connect VS Code AI extensions (Cline, Roo Code, Continue) to 7API. Use the Anthropic provider for Claude models and the OpenAI-compatible provider for GPT, GLM, DeepSeek, Kimi and Grok. VS Code coding extensions can reach 7API through either their Anthropic provider or their OpenAI-compatible provider. Open the extension's settings with **Ctrl+,** (**Cmd+,** on macOS) and search for the extension name. ## Claude models: Anthropic provider | Setting | Value | |---|---| | Provider | Anthropic | | Base URL | `https://7api.st` | | API key | Your 7API key | | Model | Any Claude model, such as `claude-opus-5-5` or `claude-sonnet-5-5` | ## Every other model: OpenAI-compatible provider | Setting | Value | |---|---| | Provider | OpenAI Compatible | | Base URL | `https://7api.st/v1` | | API key | Your 7API key | | Model ID | Any ID from the [model list](https://7api.st/pricing), such as `gpt-6.1-sol`, `glm-5.3`, `deepseek-v4.1-flash`, `kimi-k3` or `grok-4.7` | If the extension asks for a context window or output limit, use the values on the [model page](https://7api.st/pricing). Extensions that read `GET /v1/models` pick them up automatically. --- # 7API documentation > 7API documentation. One API key for Claude, GPT, Gemini, Grok, DeepSeek, GLM and Kimi through OpenAI- and Anthropic-compatible endpoints at https://7api.st. 7API is an LLM API gateway. One API key reaches models from Anthropic, OpenAI, Google, xAI, DeepSeek, Zhipu AI and Moonshot AI. That includes uncensored and abliterated variants, which are models tuned to refuse fewer requests. Billing is per token from a prepaid USD balance, and cached input costs much less than regular input. The gateway accepts three request formats. Any client or SDK that already speaks one of them works by changing two settings: the base URL and the API key. | Format | Endpoint | Base URL to configure | |---|---|---| | OpenAI Chat Completions | `POST /v1/chat/completions` | `https://7api.st/v1` | | OpenAI Responses | `POST /v1/responses` | `https://7api.st/v1` | | Anthropic Messages | `POST /v1/messages` | `https://7api.st` | Every public model works on every format. For example, a Claude model can be called through Chat Completions and a GLM model through Anthropic Messages. The one exception is `claude-sonnet-5-5`, which only works on Anthropic Messages. ## Start here - [Quickstart](https://7api.st/docs/quickstart): create a key and send your first request in under two minutes. - [Authentication](https://7api.st/docs/authentication): headers, key format and key rotation. - [Model IDs and aliases](https://7api.st/docs/model-ids): the exact strings to send as `model`. - [Models and pricing](https://7api.st/pricing): every model with its context window, output limit and per-token rate. ## API reference - [OpenAI-compatible API](https://7api.st/docs/openai-compatible-api): Chat Completions and Responses. - [Anthropic-compatible API](https://7api.st/docs/anthropic-compatible-api): Messages and token counting. - [List models](https://7api.st/docs/models-endpoint): `GET /v1/models` with limits, capabilities and prices. - [Balance, usage and status](https://7api.st/docs/account-endpoints): read your balance, spend and model health with your key. - [Subkeys](https://7api.st/docs/subkeys): issue separately funded keys to teammates or customers. ## Features - [Streaming](https://7api.st/docs/streaming): server-sent events on every endpoint. - [Prompt caching](https://7api.st/docs/prompt-caching): how cached input is billed and reported. - [Reasoning effort](https://7api.st/docs/reasoning-effort): the effort levels each model family accepts. - [Errors](https://7api.st/docs/errors) and [rate limits](https://7api.st/docs/rate-limits). ## Coding tools Step-by-step guides for [Claude Code](https://7api.st/docs/guides/claude-code), [OpenCode](https://7api.st/docs/guides/opencode), [Codex CLI](https://7api.st/docs/guides/codex), [Cursor](https://7api.st/docs/guides/cursor), [Cline, Roo Code and Continue](https://7api.st/docs/guides/vscode), [Oh My Pi](https://7api.st/docs/guides/oh-my-pi) and [CommandCode](https://7api.st/docs/guides/commandcode). ## Facts at a glance | | | |---|---| | API host | `https://7api.st` | | Authentication | `Authorization: Bearer sk-…` or `x-api-key: sk-…` | | Billing | Prepaid USD balance, charged per token. No subscription. | | Payment | Crypto (BTC, ETH, USDT, LTC and others). Top-ups start at $5. | | Rate limit | 120 requests per minute and 32 concurrent requests per account | | Machine-readable docs | [/llms.txt](https://7api.st/llms.txt), [/llms-full.txt](https://7api.st/llms-full.txt), and a `.md` version of each docs page | --- # Model IDs and aliases > The exact model strings 7API accepts, including vendor-prefixed spellings, the claude- prefix for Claude-only clients, dotted vs dashed versions and the [1m] context suffix. Send the model ID exactly as listed on [Models and pricing](https://7api.st/pricing) or returned by [`GET /v1/models`](https://7api.st/docs/models-endpoint). IDs are lowercase and case-insensitive. To make existing configurations work unchanged, the gateway also accepts several alternative spellings. ## Canonical IDs **Gemini:** `gemini-4-carbon`, `gemini-4-argon` **GPT:** `gpt-6-astra`, `gpt-6.2-astra`, `gpt-6.1-sol`, `gpt-6.2-sol`, `gpt-6-sol`, `gpt-6-luna`, `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-5.5` **Claude:** `claude-fable-5-2`, `claude-opus-5-5-max`, `claude-opus-5-5`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-5-5`, `claude-sonnet-5`, `claude-haiku-5-5` **Grok:** `grok-4.7`, `grok-4.6`, `grok-4.5` **DeepSeek:** `deepseek-v4.1-flash`, `deepseek-v4.1-flash-1017`, `deepseek-v4.1-flash-1017-hq`, `deepseek-v4.1-flash-1017-abliterated`, `deepseek-v4.1-flash-1017-abliterated-fast`, `deepseek-v4-flash-0731`, `deepseek-v4-pro-0813` **GLM:** `glm-5.2`, `glm-5.3`, `glm-5.3-uncensored`, `glm-5.3-flash`, `glm-5.3-flash-uncensored`, `glm-5.3-abliterated` **Kimi:** `kimi-k3`, `kimi-k3.1-pro` ## Accepted alternative spellings | You send | Resolves to | Why it exists | |---|---|---| | `claude-glm-5.3`, `claude-kimi-k3` | `glm-5.3`, `kimi-k3` | Some clients, such as Claude Code, only accept model names that start with `claude-`. The prefix is removed for non-Claude models. | | `glm-5-3`, `gpt-6-1-sol` | `glm-5.3`, `gpt-6.1-sol` | A dash between two digits is read as a decimal point. | | `claude-opus-5.5` | `claude-opus-5-5` | Claude versions use dashes. A dot also works. | | `z-ai/glm-5.3`, `moonshotai/kimi-k3` | `glm-5.3`, `kimi-k3` | Vendor-namespaced IDs, as used by OpenRouter-style configs | | `claude-opus-5-5[1m]` | `claude-opus-5-5` | Claude Code's `[1m]` suffix. It is removed, and the 1M-context beta is turned on. | | `deepseek-v4-pro` | `deepseek-v4-pro-0813` | Short names for date-stamped models | Unknown IDs are not silently swapped for another model. Requests for a model that doesn't exist fail with an error (see [Errors](https://7api.st/docs/errors)). ## Which API format to use Every public model is reachable through all three request formats, and the gateway translates between them. The exception is `claude-sonnet-5-5`, which is served on `/v1/messages` only. On `/v1/chat/completions` or `/v1/responses` it returns `400 unsupported_api_format`. For coding agents, use the format the generated configs use. That's Anthropic Messages for Claude models, Responses for GPT models and Chat Completions for everything else. That path has the fewest translation steps and the best tool-calling fidelity. ## Model lifecycle Retired models return `404` with a message that names the model and points to `/v1/models`. A temporarily unavailable model also returns `404`, with `code: "model_unavailable"`. Watch the [Telegram channel](https://t.me/seven_api) for catalog changes. --- # List models (GET /v1/models) > GET https://7api.st/v1/models returns every available model with context window, output limit, vision and reasoning capabilities, and per-token pricing. No key required. `GET /v1/models` (also `GET /models`) Returns the model catalog in OpenAI's list format. Each entry adds the extra fields that coding tools read to configure themselves automatically: context window, output limit, capabilities and prices. The endpoint works **without** a key. With a key, it lists exactly the models that key can use. ```bash curl https://7api.st/v1/models ``` ```json { "object": "list", "data": [ { "id": "glm-5.3", "object": "model", "owned_by": "7api", "display_name": "GLM-5.3", "company": "Zhipu AI", "context_window": 1000000, "max_output_tokens": 65536, "supports_tools": true, "supports_reasoning": true, "supports_vision": false, "input_modalities": ["text"], "supported_parameters": ["messages", "stream", "max_tokens", "…"], "pricing": { "price_usd_per_mtok": 0.05, "cache_read_usd_per_mtok": 0.01 } } ] } ``` ## Fields | Field | Meaning | |---|---| | `id` | The string to send as `model` | | `display_name`, `company`, `series` | Human-readable labels | | `context_window` | Maximum input plus output tokens. The same value is repeated as `context_length`, `max_input_tokens`, `max_model_len` and `limit.context`, because clients read different names. | | `max_output_tokens` | Maximum output per request. Repeated as `max_completion_tokens`, `max_tokens` and `limit.output`. | | `supports_vision`, `input_modalities` | Whether image input is accepted | | `supported_reasoning_efforts`, `default_reasoning_effort` | Present on models with a fixed effort scale, such as Kimi and DeepSeek abliterated | | `capabilities.effort`, `capabilities.thinking` | Anthropic-style capability data, read by Claude Code and Claude Desktop | | `pricing.price_usd_per_mtok` | USD per million input and cache-write tokens; also applies to output unless an output rate is provided | | `pricing.output_usd_per_mtok` | Separate output rate when present, including reasoning tokens | | `pricing.cache_read_usd_per_mtok` | USD per million cached input tokens | Prices in this response are the rates your key is billed at. They match the [pricing page](https://7api.st/pricing). ## Options `?exclude=glm` hides the GLM family. Some clients use it to shorten long pickers. ## Rate limit The model list, balance, usage and status endpoints share a limit of 600 requests per minute per IP address. Cache the list rather than fetching it before every request. --- # OpenAI-compatible API > 7API's OpenAI-compatible Chat Completions and Responses endpoints. Base URL https://7api.st/v1, supported parameters, tool calling, vision, structured output and SDK examples. 7API implements the OpenAI **Chat Completions** and **Responses** APIs. Point any OpenAI SDK or OpenAI-compatible tool at the base URL below, keep your request code as it is, and choose a model from the [catalog](https://7api.st/pricing). You don't need an OpenAI account. ```text Base URL: https://7api.st/v1 Header: Authorization: Bearer sk-your-key ``` ## Chat Completions `POST /v1/chat/completions` (also accepted at `/chat/completions`) ```bash curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4.1-flash", "messages": [ {"role": "system", "content": "You are terse."}, {"role": "user", "content": "Name three sorting algorithms."} ], "max_tokens": 200 }' ``` The response follows OpenAI's shape: ```json { "id": "chatcmpl-…", "object": "chat.completion", "model": "deepseek-v4.1-flash", "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Quicksort, mergesort, heapsort." }, "finish_reason": "stop" }], "usage": { "prompt_tokens": 24, "completion_tokens": 9, "total_tokens": 33, "prompt_tokens_details": { "cached_tokens": 0 } } } ``` ### Supported parameters | Parameter | Notes | |---|---| | `model` | Required. 1–128 characters. See [Model IDs](https://7api.st/docs/model-ids). | | `messages` | Required. Text and, on [vision models](https://7api.st/pricing), `image_url` parts | | `stream`, `stream_options` | See [Streaming](https://7api.st/docs/streaming). Usage is always reported in the final chunk. | | `max_tokens` / `max_completion_tokens` | Default 16,384 if omitted, maximum 131,072. If you send both, they must be equal. | | `temperature`, `top_p`, `stop` | Passed to the model | | `tools`, `tool_choice`, `parallel_tool_calls` | Function calling on every model | | `response_format` | JSON mode and JSON schema, except `kimi-k3.1-pro` | | `reasoning_effort` | See [Reasoning effort](https://7api.st/docs/reasoning-effort) | | `n` | 1–4 | ### Tool calling ```python from openai import OpenAI client = OpenAI(base_url="https://7api.st/v1", api_key="sk-your-key") tools = [{ "type": "function", "function": { "name": "get_weather", "description": "Current weather for a city", "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}, }, }] r = client.chat.completions.create(model="kimi-k3", messages=[{"role": "user", "content": "Weather in Oslo?"}], tools=tools) print(r.choices[0].message.tool_calls) ``` ### Images Models listed with *Text and images* input on their [model page](https://7api.st/pricing) accept `image_url` content parts (URLs or base64 data URLs). On the text-only GLM and DeepSeek models, each image is replaced by a short text placeholder instead of an error. That way, an image left earlier in a conversation doesn't break the later turns. ## Responses API `POST /v1/responses` (also accepted at `/responses`) Codex CLI, recent OpenAI SDKs and agent frameworks use the Responses API. It accepts: - `input` (a string or an item list) and `instructions` - `tools` - `reasoning.effort` and `max_output_tokens` - `stream` To continue a conversation, resend the full history in `input`. This works on every model. `previous_response_id` also works on GPT models, which run natively on Responses. It only accepts IDs returned to your own account for the same model. ```bash curl https://7api.st/v1/responses \ -H "Authorization: Bearer $SEVENAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "gpt-6.1-sol", "input": "One sentence on why caching cuts LLM cost.", "reasoning": {"effort": "low"}}' ``` The Responses API works for every model, not only GPT. Non-GPT models are translated to and from Chat Completions by the gateway. ## Other endpoints | Endpoint | Purpose | |---|---| | `GET /v1/models` | [Model catalog](https://7api.st/docs/models-endpoint) with limits and prices | | `GET /v1/balance`, `GET /v1/usage`, `GET /v1/status` | [Account endpoints](https://7api.st/docs/account-endpoints) | | `GET /v1/dashboard/billing/credit_grants`, `…/subscription` | OpenAI-style billing endpoints, for balance widgets in existing tools | Embeddings, image generation, audio and fine-tuning endpoints are **not** available. Unsupported paths return `404 not_found_error`. ## Differences from OpenAI's API - Requests with `n` greater than 1 are billed for every completion, as at OpenAI. - Organization and project headers are ignored. - The response `id` is generated by 7API. Store your own identifiers if you need to correlate requests. --- # Pricing and billing > How 7API billing works. Prepaid USD balance, pay-per-token rates per model, discounted cached input, crypto top-ups from $5 with bonus credit up to 16%, and what happens to failed requests. 7API is pay as you go. You add funds to a prepaid USD balance, and each request is charged for the tokens it uses at that model's rate. There's no subscription, no monthly minimum and no seat fee. ## Rates Rates are in USD per million tokens: - **Input rate**: new input tokens and cache-write tokens. - **Output rate**: generated tokens, including reasoning. - **Cache rate**: input tokens served from the [prompt cache](https://7api.st/docs/prompt-caching). Most models share one standard input/output rate. DeepSeek V4.1 Flash 1017 HQ costs $0.05/M for both input and output, and $0.01/M cached input. The full list is on [Models and pricing](https://7api.st/pricing) and in [`GET /v1/models`](https://7api.st/docs/models-endpoint). Rates range from $0.02 to $0.80 per million standard tokens. Popular models are listed below. See [all 40 models](https://7api.st/pricing) for the rest. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [GLM 5.3](https://7api.st/models/glm-5.3) | `glm-5.3` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [GLM 5.3 Flash](https://7api.st/models/glm-5.3-flash) | `glm-5.3-flash` | 1M | 66K | $0.025 | $0.025 | $0.0025 | | [DeepSeek V4.1 Flash](https://7api.st/models/deepseek-v4.1-flash) | `deepseek-v4.1-flash` | 1M | 66K | $0.02 | $0.02 | $0.005 | | [Kimi K3](https://7api.st/models/kimi-k3) | `kimi-k3` | 1M | 66K | $0.15 | $0.15 | $0.03 | | [GPT-6.1 Sol](https://7api.st/models/gpt-6.1-sol) | `gpt-6.1-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [Claude Haiku 5.5](https://7api.st/models/claude-haiku-5-5) | `claude-haiku-5-5` | 1M | 64K | $0.03 | $0.03 | $0.01 | | [Claude Opus 5.5](https://7api.st/models/claude-opus-5-5) | `claude-opus-5-5` | 1M | 128K | $0.70 | $0.70 | $0.07 | | [GLM 5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) | `glm-5.3-abliterated` | 1M | 130K | $0.80 | $0.80 | $0.25 | ## Adding funds Top up in the [dashboard](https://7api.st/funds) or through the [Telegram bot](https://t.me/hqclaudebot). Payment is in crypto (BTC, ETH, USDT, LTC and others) through a hosted checkout. The balance is credited automatically after the payment confirms on-chain, usually within a few minutes. Larger top-ups earn bonus credit: | Pay | Bonus | Credited | |--:|--:|--:| | $5 | — | $5.00 | | $10 | 1% | $10.10 | | $25 | 3% | $25.75 | | $50 | 5% | $52.50 | | $100 | 8% | $108.00 | | $200 | 12% | $224.00 | | $500 | 16% | $580.00 | ## What you're charged for - You're charged only for what's used. Token counts come from the model's reported usage, or a gateway estimate when the upstream doesn't report it. - **Failed requests that deliver nothing aren't charged.** - If a streamed response is interrupted, including when your client disconnects, you pay for the tokens that were delivered. - Reasoning tokens count as output. - Balance never expires. ## Running out At zero balance, generation requests return `402 insufficient_balance`. Account endpoints (`/v1/balance`, `/v1/usage`, `/v1/status`) and the dashboard keep working. A request whose worst-case cost exceeds your balance is also refused up front. See [balance holds](https://7api.st/docs/rate-limits#balance-holds). ## Refunds Contact [support](https://t.me/ogsadly) about billing problems, such as a charge you think is wrong or a payment that hasn't been credited. Include your account ID, which is shown on the dashboard Overview, and the payment transaction ID. ## Reselling [Subkeys](https://7api.st/docs/subkeys) let you fund separate keys for your own customers. Moving balance into a subkey has no fee. --- # Prompt caching > How 7API bills cached input tokens at a separate, much lower rate, how cache hits are reported in OpenAI and Anthropic usage fields, and how to get high cache-hit rates with coding agents. When a request starts with the same prefix as a recent one (the same system prompt, tools and earlier conversation turns), the upstream provider can read that prefix from cache instead of processing it again. 7API bills those cached input tokens at each model's **cache rate**, which is usually 70–95% below the standard rate. For coding agents, which resend a growing conversation on every turn, caching is the largest single factor in cost. ## How it's billed ```text standard_tokens = new_input + cache_writes + output cost_usd = (standard_tokens × model_rate + cached_input × cache_rate) / 1,000,000 ``` - **Cache writes** are billed at the standard rate. There is no write surcharge. - **Cached input** is billed at the cache rate shown for each model on the [pricing page](https://7api.st/pricing). - Token counts are never rounded, and there is no per-request minimum. Example: `glm-5.3` costs $0.05 per million standard tokens and $0.01 per million cached tokens. A turn with 150,000 cached input tokens, 2,000 new input tokens and 800 output tokens costs (2,800 × 0.05 + 150,000 × 0.01) / 1,000,000 = **$0.00164**. Without caching, the same turn would cost $0.00764. ## How to tell whether a request hit the cache | Format | Field | |---|---| | Chat Completions | `usage.prompt_tokens_details.cached_tokens`, part of `prompt_tokens` | | Responses | `usage.input_tokens_details.cached_tokens` | | Anthropic Messages | `usage.cache_read_input_tokens` (not included in `input_tokens`) and `usage.cache_creation_input_tokens` | The [dashboard's Usage page](https://7api.st/usage) and `GET /v1/usage` show your cached share and the dollars saved for each period. For eligible repeated input, 7API may fund cache-rate protection. Covered tokens are reported in these same cached-token fields and charged at the cache rate, even when the upstream processed them without a cache hit. These fields describe billable cache-rate usage; they are not proof of upstream cache reuse. New input and output remain subject to the model's standard rate. ## Getting more cache hits Caching is automatic on most models. The gateway passes Anthropic `cache_control` breakpoints through unchanged, so clients that set them, such as Claude Code, keep their behavior. What determines your hit rate is how stable your prompt prefix is: 1. **Keep the beginning of the prompt fixed.** Put the system prompt, tool definitions and long reference documents first, and don't edit them between turns. 2. **Append, don't rewrite.** Add new turns at the end. Changing an early message invalidates the cache from that point onward. 3. **Avoid per-request noise early in the prompt.** Timestamps, random IDs or reordered tool lists near the top cause misses on every turn. 4. **Keep one conversation on one model.** Caches are per model. Switching models mid-conversation starts cold. 5. **Expect a miss on the first request.** The first request in a session writes the cache, and later ones read it. --- # Quickstart > Get a 7API key and connect Claude Code, OpenCode, Codex CLI, Cline, Roo Code, Oh My Pi or CommandCode in a few minutes. Raw API examples for curl, the OpenAI SDK and the Anthropic SDK at the end. This page takes you from no account to a working coding agent in about five minutes. Pick the tool you already use; each one needs only a base URL and your key. ## 1. Create an account and copy your key Open [7api.st](https://7api.st/) and choose **Create account**. You don't need an email address. The site shows your API key once, so save it somewhere safe. The key is also your login. Keys look like `sk-` followed by 48 hexadecimal characters. You can also sign up through the Telegram bot [@hqclaudebot](https://t.me/hqclaudebot). Both routes create the same kind of account. ## 2. Add funds Requests need a positive balance. Open **Add funds** in the dashboard, pick an amount ($5 minimum) and pay with crypto. The balance is credited automatically once the payment confirms on-chain. See [Pricing and billing](https://7api.st/docs/pricing-and-billing) for the bonus tiers. ## 3. Connect your tool > **Tip:** The dashboard's [Setup page](https://7api.st/setup) generates every config below with your key already filled in. ### Claude Code 1. Save this as `~/.claude/settings.json` (Windows: `%USERPROFILE%\.claude\settings.json`) and replace `YOUR_7API_KEY` with your key. 2. Run `claude` in your project folder. 3. Pick a model with `/model`. Non-Claude models take a `claude-` prefix, for example `/model claude-glm-5.3`. ```json title="settings.json" { "env": { "ANTHROPIC_BASE_URL": "https://7api.st", "ANTHROPIC_AUTH_TOKEN": "YOUR_7API_KEY", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1", "CLAUDE_CODE_ATTRIBUTION_HEADER": "0", "DISABLE_TELEMETRY": "1", "DISABLE_ERROR_REPORTING": "1", "DISABLE_AUTOUPDATER": "1", "DISABLE_BUG_COMMAND": "1", "DISABLE_COST_WARNINGS": "1", "DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1" }, "permissions": { "defaultMode": "auto" }, "model": "opus[1m]", "effortLevel": "high", "theme": "dark" } ``` ### OpenCode 1. Save this as `~/.config/opencode/opencode.json` (Windows: `%USERPROFILE%\.config\opencode\opencode.json`). 2. Replace `YOUR_7API_KEY` with your key. It appears once per provider block. 3. Run `opencode`, pick a model with `/models` and cycle reasoning effort with **Ctrl+T**. ```json title="opencode.json" { "$schema": "https://opencode.ai/config.json", "model": "7api/gpt-6.1-sol", "small_model": "7api/gpt-6-luna", "provider": { "7api": { "npm": "@ai-sdk/openai", "name": "7API — GPT", "options": { "baseURL": "https://7api.st/v1", "apiKey": "YOUR_7API_KEY" }, "models": { "gpt-6-astra": {"name":"GPT-6 Astra","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6.2-astra": {"name":"GPT-6.2 Astra","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6.1-sol": {"name":"GPT-6.1 Sol","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6.2-sol": {"name":"GPT-6.2 Sol","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6-sol": {"name":"GPT-6 Sol","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-6-luna": {"name":"GPT-6 Luna","limit":{"context":1050000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.6-sol": {"name":"GPT-5.6 Sol","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.6-terra": {"name":"GPT-5.6 Terra","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.6-luna": {"name":"GPT-5.6 Luna","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"max":{"reasoningEffort":"max","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}}, "gpt-5.5": {"name":"GPT-5.5","limit":{"context":1000000,"output":128000},"reasoning":true,"tool_call":true,"options":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"variants":{"none":{"reasoningEffort":"none","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"low":{"reasoningEffort":"low","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"medium":{"reasoningEffort":"medium","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"high":{"reasoningEffort":"high","reasoningSummary":"auto","include":["reasoning.encrypted_content"]},"xhigh":{"reasoningEffort":"xhigh","reasoningSummary":"auto","include":["reasoning.encrypted_content"]}}} } }, "7api-claude": { "npm": "@ai-sdk/anthropic", "name": "7API — Claude", "options": { "baseURL": "https://7api.st/v1", "apiKey": "YOUR_7API_KEY" }, "models": { "claude-fable-5-2": {"name":"Claude Fable 5.2","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-5-5-max": {"name":"Claude Opus 5.5 Max","limit":{"context":1000000,"output":128000},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-5-5": {"name":"Claude Opus 5.5","limit":{"context":1000000,"output":128000},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-5": {"name":"Claude Opus 5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-4-8": {"name":"Claude Opus 4.8","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-4-7": {"name":"Claude Opus 4.7","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-opus-4-6": {"name":"Claude Opus 4.6","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive"},"effort":"low"},"medium":{"thinking":{"type":"adaptive"},"effort":"medium"},"high":{"thinking":{"type":"adaptive"},"effort":"high"},"max":{"thinking":{"type":"adaptive"},"effort":"max"}}}, "claude-sonnet-5-5": {"name":"Claude Sonnet 5.5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-sonnet-5": {"name":"Claude Sonnet 5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}}, "claude-haiku-5-5": {"name":"Claude Haiku 5.5","limit":{"context":1000000,"output":64000},"reasoning":true,"tool_call":true,"options":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"variants":{"none":{"thinking":{"type":"disabled"}},"low":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"low"},"medium":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"medium"},"high":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"high"},"xhigh":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"xhigh"},"max":{"thinking":{"type":"adaptive","display":"summarized"},"effort":"max"}}} } }, "7api-other": { "npm": "@ai-sdk/openai-compatible", "name": "7API — Other", "options": { "baseURL": "https://7api.st/v1", "apiKey": "YOUR_7API_KEY" }, "models": { "gemini-4-carbon": {"name":"Gemini 4 Carbon","limit":{"context":1048576,"output":16384},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "gemini-4-argon": {"name":"Gemini 4 Argon","limit":{"context":128000,"output":16384},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "glm-5.2": {"name":"GLM-5.2","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3": {"name":"GLM-5.3","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-uncensored": {"name":"GLM-5.3 Uncensored","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-flash": {"name":"GLM-5.3 Flash","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-flash-uncensored": {"name":"GLM-5.3 Flash Uncensored","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "glm-5.3-abliterated": {"name":"GLM-5.3 Abliterated (100% Uncensored)","limit":{"context":1000000,"output":130000},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"high"},"variants":{"high":{"reasoningEffort":"high"},"xhigh":{"reasoningEffort":"xhigh"},"max":{"reasoningEffort":"max"}}}, "deepseek-v4-flash-0731": {"name":"DeepSeek V4 Flash","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash": {"name":"DeepSeek V4.1 Flash","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash-1017": {"name":"DeepSeek V4.1 Flash 1017","limit":{"context":1000000,"output":65536},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash-1017-hq": {"name":"DeepSeek V4.1 Flash 1017 HQ","limit":{"context":1000000,"output":65536},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4.1-flash-1017-abliterated": {"name":"DeepSeek V4.1 Flash 1017 Abliterated","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"high"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"high":{"reasoningEffort":"high"},"max":{"reasoningEffort":"max"}}}, "deepseek-v4.1-flash-1017-abliterated-fast": {"name":"DeepSeek V4.1 Flash 1017 Abliterated Fast","limit":{"context":1000000,"output":65536},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "deepseek-v4-pro-0813": {"name":"DeepSeek V4 Pro","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"medium"},"variants":{"none":{"reasoningEffort":"none"},"low":{"reasoningEffort":"low"},"medium":{"reasoningEffort":"medium"},"high":{"reasoningEffort":"high"}}}, "mimo-v2.6-pro": {"name":"MiMo V2.6 Pro","limit":{"context":600000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "mimo-v2.6-flash": {"name":"MiMo V2.6 Flash","limit":{"context":600000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"}}, "kimi-k3": {"name":"Kimi K3","limit":{"context":1000000,"output":65536},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"max"},"variants":{"low":{"reasoningEffort":"low"},"high":{"reasoningEffort":"high"},"max":{"reasoningEffort":"max"}}}, "kimi-k3.1-pro": {"name":"Kimi K3.1 Pro","limit":{"context":1000000,"output":32000},"attachment":true,"modalities":{"input":["text","image"],"output":["text"]},"reasoning":true,"tool_call":true,"interleaved":{"field":"reasoning_content"},"options":{"reasoningEffort":"max"},"variants":{"low":{"reasoningEffort":"low"},"high":{"reasoningEffort":"high"},"max":{"reasoningEffort":"max"}}}, "grok-4.7": {"name":"Grok 4.7","limit":{"context":500000,"output":65536}}, "grok-4.6": {"name":"Grok 4.6","limit":{"context":500000,"output":65536}}, "grok-4.5": {"name":"Grok 4.5","limit":{"context":200000,"output":64000}} } } } } ``` ### Codex CLI 1. Save this as `~/.codex/config.toml` (Windows: `%USERPROFILE%\.codex\config.toml`). 2. Replace `YOUR_7API_KEY` with your key. 3. Run `codex`. The default model is `gpt-6-astra`; change `model` to switch. ```toml title="config.toml" # GPT-6 Astra: 1.05M context, auto-compacts at 900K (leaves room for 128K output). # gpt-6.1-sol and gpt-6-luna use the same limits. model = "gpt-6-astra" model_provider = "7api" model_reasoning_effort = "high" approval_policy = "never" model_context_window = 1050000 model_auto_compact_token_limit = 900000 [model_providers.7api] name = "7api" base_url = "https://7api.st" wire_api = "responses" experimental_bearer_token = "YOUR_7API_KEY" [windows] sandbox = "elevated" ``` ### Cursor > **No longer works:** Cursor has patched `cursor-byok`, and this setup no longer works. Use another harness, such as **[OpenCode](https://7api.st/docs/guides/opencode)**, **[Oh My Pi (OMP)](https://7api.st/docs/guides/oh-my-pi)**, or another compatible client. Do not follow the steps below; they are kept only for historical reference. 1. Install Cursor, then download [cursor-byok](https://github.com/leookun/cursor-byok/releases) for your OS and follow its setup guide. 2. In cursor-byok, open **Model Settings** and add a model with base URL `https://7api.st/v1`, your 7API key, and the model type, protocol and ID from the table. 3. Keep **full URL mode** off, test the model and start the cursor-byok service. 4. Fully quit and reopen Cursor, start a new chat and select your model. | Model family | Model type | Request protocol | Example model ID | |---|---|---|---| | Claude | Anthropic | Messages (automatic, no setting) | `claude-opus-5-5` | | GPT | OpenAI | Responses API | `gpt-6-astra` | | GLM, DeepSeek, Kimi, Grok, Gemini | OpenAI | Chat Completions | `glm-5.3`, `kimi-k3` | ### Cline / Roo / Continue 1. Open the extension's settings in VS Code (**Ctrl+,** or **Cmd+,**). 2. For Claude models, choose the **Anthropic** provider. For every other model, choose **OpenAI Compatible**. 3. Enter the base URL and your key from the table, then type a model ID. | | Claude models | Every other model | |---|---|---| | Provider | Anthropic | OpenAI Compatible | | Base URL | `https://7api.st` | `https://7api.st/v1` | | API key | Your 7API key | Your 7API key | | Model | `claude-opus-5-5` | `glm-5.3`, `gpt-6.1-sol`, `kimi-k3` | ### Oh My Pi 1. Install OMP: `curl -fsSL https://omp.sh/install | sh` 2. Save this as `~/.omp/agent/models.yml` (Windows: `%USERPROFILE%\.omp\agent\models.yml`) and replace `YOUR_7API_KEY`. 3. Run `omp`, pick a model with `/model` and set effort with `/effort` or **Shift+Tab**. ```yaml title="models.yml" providers: 7api: baseUrl: https://7api.st/v1 api: openai-completions auth: apiKey apiKey: "YOUR_7API_KEY" models: - id: gpt-6-astra name: GPT-6 Astra api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6.2-astra name: GPT-6.2 Astra api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6.1-sol name: GPT-6.1 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6.2-sol name: GPT-6.2 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6-sol name: GPT-6 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-6-luna name: GPT-6 Luna api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1050000 maxTokens: 128000 - id: gpt-5.6-sol name: GPT-5.6 Sol api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: gpt-5.6-terra name: GPT-5.6 Terra api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: gpt-5.6-luna name: GPT-5.6 Luna api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: gpt-5.5 name: GPT-5.5 api: openai-responses reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh] } contextWindow: 1000000 maxTokens: 128000 - id: claude-fable-5-2 name: Claude Fable 5.2 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-5-5-max name: Claude Opus 5.5 Max api: anthropic-messages input: [text, image] reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: claude-opus-5-5 name: Claude Opus 5.5 api: anthropic-messages input: [text, image] reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 128000 - id: claude-opus-5 name: Claude Opus 5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-4-8 name: Claude Opus 4.8 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-4-7 name: Claude Opus 4.7 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-opus-4-6 name: Claude Opus 4.6 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-sonnet-5-5 name: Claude Sonnet 5.5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-sonnet-5 name: Claude Sonnet 5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: claude-haiku-5-5 name: Claude Haiku 5.5 api: anthropic-messages reasoning: true thinking: { mode: anthropic-adaptive, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 64000 - id: gemini-4-carbon name: Gemini 4 Carbon reasoning: true contextWindow: 1048576 maxTokens: 16384 - id: gemini-4-argon name: Gemini 4 Argon reasoning: true contextWindow: 128000 maxTokens: 16384 - id: deepseek-v4-flash-0731 name: DeepSeek V4 Flash reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash name: DeepSeek V4.1 Flash reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017 name: DeepSeek V4.1 Flash 1017 input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017-hq name: DeepSeek V4.1 Flash 1017 HQ input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017-abliterated name: DeepSeek V4.1 Flash 1017 Abliterated reasoning: true thinking: { mode: effort, efforts: [low, high, max], defaultLevel: high } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4.1-flash-1017-abliterated-fast name: DeepSeek V4.1 Flash 1017 Abliterated Fast input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: deepseek-v4-pro-0813 name: DeepSeek V4 Pro reasoning: true thinking: { mode: effort, efforts: [low, medium, high] } contextWindow: 1000000 maxTokens: 65536 - id: mimo-v2.6-pro name: MiMo V2.6 Pro reasoning: true contextWindow: 600000 maxTokens: 65536 - id: mimo-v2.6-flash name: MiMo V2.6 Flash reasoning: true contextWindow: 600000 maxTokens: 65536 - id: kimi-k3 name: Kimi K3 reasoning: true thinking: { mode: effort, efforts: [low, high, max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: kimi-k3.1-pro name: Kimi K3.1 Pro input: [text, image] reasoning: true thinking: { mode: effort, efforts: [low, high, max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 32000 - id: grok-4.7 name: Grok 4.7 reasoning: true contextWindow: 500000 maxTokens: 65536 - id: grok-4.6 name: Grok 4.6 reasoning: true contextWindow: 500000 maxTokens: 65536 - id: grok-4.5 name: Grok 4.5 reasoning: true contextWindow: 200000 maxTokens: 64000 7api-glm: baseUrl: https://7api.st/v1 api: openai-completions apiKey: "YOUR_7API_KEY" compat: supportsReasoningEffort: true thinkingFormat: openai reasoningContentField: reasoning_content models: - id: glm-5.2 name: GLM-5.2 reasoning: true thinking: { mode: effort, efforts: [low, medium, high, xhigh, max] } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3 name: GLM-5.3 reasoning: true thinking: { mode: effort, efforts: [low, high, xhigh, max], defaultLevel: high, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-uncensored name: GLM-5.3 Uncensored reasoning: true thinking: { mode: effort, efforts: [max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-flash name: GLM-5.3 Flash reasoning: true thinking: { mode: effort, efforts: [low, high, xhigh, max], defaultLevel: high, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-flash-uncensored name: GLM-5.3 Flash Uncensored reasoning: true thinking: { mode: effort, efforts: [max], defaultLevel: max, requiresEffort: true } contextWindow: 1000000 maxTokens: 65536 - id: glm-5.3-abliterated name: GLM-5.3 Abliterated reasoning: true thinking: { mode: effort, efforts: [high, xhigh, max], defaultLevel: high, requiresEffort: true } contextWindow: 1000000 maxTokens: 130000 ``` ### CommandCode 1. Open CommandCode and enter `/connect`. 2. Choose **BYOK** and enter `7api.st` as the **Provider ID**. 3. Choose **OpenAI** and paste `https://7api.st/v1` as the URL. 4. Paste your 7API key. 5. Pick a model. CommandCode reads the list from `/v1/models`, so every model appears automatically. Full guides with every option: [Claude Code](https://7api.st/docs/guides/claude-code) · [OpenCode](https://7api.st/docs/guides/opencode) · [Codex CLI](https://7api.st/docs/guides/codex) · [Cursor](https://7api.st/docs/guides/cursor) · [Cline, Roo Code, Continue](https://7api.st/docs/guides/vscode) · [Oh My Pi](https://7api.st/docs/guides/oh-my-pi) · [CommandCode](https://7api.st/docs/guides/commandcode). > **Note:** OpenAI-format tools take the base URL **with** `/v1` (`https://7api.st/v1`). Anthropic-format tools such as Claude Code take it **without** `/v1` (`https://7api.st`), because they add `/v1/messages` themselves. If you get a 404, the most likely cause is a missing or doubled `/v1`. ## 4. Pick a model Any ID from the [model list](https://7api.st/pricing) works in any tool. Good starting points: - **Hardest coding tasks:** `claude-opus-5-5` or `gpt-6-astra` - **Cheap, fast agent work:** `glm-5.3`, `deepseek-v4.1-flash` - **Fewer refusals:** `glm-5.3-abliterated`, `glm-5.3-uncensored` (see [Uncensored AI API](https://7api.st/uncensored-ai-api)) ## 5. Check what you spent The dashboard's **Usage** page shows spend, tokens and cache savings per period. From a script: ```bash curl https://7api.st/v1/balance -H "Authorization: Bearer $SEVENAPI_API_KEY" ``` ## Call the API directly {#api} Building your own app instead of using a coding tool? 7API is a drop-in replacement for the OpenAI and Anthropic APIs. Set your key as an environment variable: ```bash export SEVENAPI_API_KEY="sk-your-key" ``` Then call any model. The examples below use `glm-5.3`; replace it with any ID from the [model list](https://7api.st/pricing). ```bash tab=curl curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.3", "messages": [{"role": "user", "content": "Say hello in five words."}] }' ``` ```python tab=Python # pip install openai import os from openai import OpenAI client = OpenAI(base_url="https://7api.st/v1", api_key=os.environ["SEVENAPI_API_KEY"]) reply = client.chat.completions.create( model="glm-5.3", messages=[{"role": "user", "content": "Say hello in five words."}], ) print(reply.choices[0].message.content) ``` ```js tab=Node.js // npm install openai import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://7api.st/v1', apiKey: process.env.SEVENAPI_API_KEY }); const reply = await client.chat.completions.create({ model: 'glm-5.3', messages: [{ role: 'user', content: 'Say hello in five words.' }], }); console.log(reply.choices[0].message.content); ``` ```python tab="Anthropic SDK" # pip install anthropic import os from anthropic import Anthropic client = Anthropic(base_url="https://7api.st", api_key=os.environ["SEVENAPI_API_KEY"]) reply = client.messages.create( model="claude-opus-5-5", max_tokens=512, messages=[{"role": "user", "content": "Say hello in five words."}], ) print(reply.content[0].text) ``` Each response includes a `usage` object with input, cached and output token counts. More: [OpenAI-compatible API](https://7api.st/docs/openai-compatible-api) · [Anthropic-compatible API](https://7api.st/docs/anthropic-compatible-api) · [Streaming](https://7api.st/docs/streaming) · [Prompt caching](https://7api.st/docs/prompt-caching). --- # Rate limits and request size > 7API main-key and subkey rate limits, including separate shared subkey limits of 600 requests per minute and 128 concurrent requests, metadata endpoint limits and request size limits. ## Request limits | Scope | Limit | When exceeded | |---|---|---| | Account (main key) | **120 requests per minute** and **32 concurrent requests** | `429 rate_limit_error` with `Retry-After` | | Each subkey | **60 requests per minute** and **16 concurrent requests** | `429 rate_limit_error` with `Retry-After` | | All subkeys of one parent combined | **600 requests per minute** and **128 concurrent requests**, separate from the main key's allowance | `429 rate_limit_error` with `Retry-After` | | `GET /v1/models`, `/v1/balance`, `/v1/usage`, `/v1/status` | 600 requests per minute per IP address | `429` with `Retry-After: 60` | The per-minute window is fixed and resets every 60 seconds. A request counts toward the concurrency limit from the time it's accepted until its response, or stream, finishes. If you need higher limits for production workloads, contact [support](https://t.me/ogsadly) with your expected request rate. ## Size limits | Limit | Value | |---|---| | Request body on generation endpoints | 25 MB of UTF-8 JSON | | Request body on other endpoints | 1 MB | | `model` string | 1–128 characters | | Default output (`max_tokens` omitted) | 16,384 tokens (130,000 for the GLM abliterated models) | | Maximum output per request | 131,072 tokens, capped further by each model's own limit (see [models](https://7api.st/pricing)) | | Completions per request (`n`) | 1–4 on Chat Completions, 1 elsewhere | | Context window | Per model, up to 1,050,000 tokens. See [models](https://7api.st/pricing). | ## Balance holds When a request starts, the gateway reserves its worst-case cost from your balance: the estimated input plus the full output limit. When the request finishes, it charges the actual usage and releases the rest. A huge `max_tokens` on a small balance can therefore return `402` even when the real cost would have fit. Set `max_tokens` to what you actually need. --- # Reasoning effort > Control how long 7API models think. reasoning_effort, reasoning.effort, output_config.effort and thinking, plus the effort levels accepted by Claude, GPT, GLM, DeepSeek and Kimi models. Most models in the catalog reason before they answer. Higher effort usually means better answers on hard problems, with more output tokens and a longer wait before the first visible token. Reasoning tokens are billed as output. ## Parameters Send whichever parameter your client already uses. The gateway converts it to what the model expects. | Parameter | Format | Example | |---|---|---| | `reasoning_effort` | Chat Completions | `"reasoning_effort": "high"` | | `reasoning.effort` | Responses | `"reasoning": {"effort": "high"}` | | `output_config.effort` | Anthropic Messages (used by Claude Code) | `"output_config": {"effort": "high"}` | | `thinking` | Anthropic Messages | `{"type": "adaptive"}`. `{"type": "enabled", "budget_tokens": N}` is accepted on `claude-opus-4-6` only. | ## Levels by model family | Models | Accepted levels | Notes | |---|---|---| | Claude (Opus, Sonnet, Haiku) | `low`, `medium`, `high`, `xhigh`, `max` | `claude-opus-4-6` has no `xhigh`. | | GPT-6 / GPT-5.6 | `none`, `low`, `medium`, `high`, `xhigh`, `max` | `gpt-5.5` stops at `xhigh`. On `gpt-6.1-sol`, `max` becomes `xhigh` and `none` becomes `low`. | | GLM 5.3, GLM 5.3 Flash | `low`, `high`, `xhigh`, `max` | Other values become `high`. | | GLM 5.3 Abliterated | `high`, `xhigh`, `max` | The minimum and default is `high`. Thinking can't be turned off. | | GLM 5.3 Uncensored, GLM 5.3 Flash Uncensored | `max` | Always maximum effort | | DeepSeek V4 / V4.1 | `low`, `medium`, `high` | | | DeepSeek V4.1 Flash 1017 Abliterated | `none`, `low`, `high`, `max` | Defaults to `high` | | Kimi K3, Kimi K3.1 Pro | `low`, `high`, `max` | Defaults to `max`. `medium` becomes `high`, `xhigh` becomes `max`, and `none`, `off` and `minimal` become `low`. Any other value returns `400 invalid_reasoning_effort`. | `GET /v1/models` reports `supported_reasoning_efforts` and `default_reasoning_effort` for models with a fixed scale. That lets clients such as OpenCode and Oh My Pi build their effort pickers automatically. ## Output budget Reasoning and the final answer share the request's output limit (`max_tokens` or an equivalent). At high effort, set the limit generously. The GLM abliterated models default to a 130,000-token output budget for this reason. --- # Streaming > Stream tokens from 7API with server-sent events on Chat Completions, Responses and Anthropic Messages. Usage in the final chunk, keep-alive comments and mid-stream error events. Set `"stream": true` on any generation endpoint to receive tokens as server-sent events (SSE). Each format's events match its original API, so the SDKs' streaming helpers work unchanged. | Endpoint | Event format | |---|---| | `/v1/chat/completions` | `data: {chat.completion.chunk}` lines, ending with `data: [DONE]` | | `/v1/responses` | Typed `response.*` events, such as `response.output_text.delta` and `response.completed` | | `/v1/messages` | Anthropic events: `message_start`, `content_block_delta`, `message_delta`, `message_stop` | ```python from openai import OpenAI client = OpenAI(base_url="https://7api.st/v1", api_key="sk-your-key") for chunk in client.chat.completions.create( model="glm-5.3-flash", stream=True, messages=[{"role": "user", "content": "Count to ten."}], ): if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True) ``` ## Usage in streams On Chat Completions, the final chunk before `[DONE]` carries a `usage` object with token counts, including `prompt_tokens_details.cached_tokens`. Its `choices` array is empty. The gateway requests usage from every upstream, so you don't need to send `stream_options.include_usage`. Anthropic streams report usage in `message_start` and `message_delta`, and Responses streams report it in `response.completed`. ## Keep-alive Long-thinking models can take a while before the first token. To stop proxies and load balancers from closing an idle connection, the gateway may send the response headers early and then an SSE comment line every 15 seconds: ```text : 7api keep-alive ``` Lines that start with `:` are comments under the SSE specification, and compliant clients ignore them. If you parse SSE by hand, skip them. ## Errors during a stream If something fails after the stream has started, the gateway can't change the HTTP status anymore. It sends an error event in the stream's own format instead: ```text event: error data: {"type":"error","error":{"type":"overloaded_error","message":"…"}} ``` On OpenAI formats, the error is a `data: {"error": {…}}` line. Treat it as a failed request. You are charged only for output that was actually delivered. ## Non-streaming requests With `stream` omitted or `false`, you get one JSON response. For very long generations, streaming is still recommended, because it avoids client-side read timeouts. --- # Subkeys > Create separately funded 7API API keys for teammates or customers. Move balance in and out, track spend per key and revoke instantly with the /v1/subkeys API. A subkey is a separate API key funded from your balance. Give it to a teammate, a client or one of your own apps. It works exactly like a normal key, with the same base URL and models. Its spending is tracked separately, and you can take back unused balance or shut it off at any time. - Funding a subkey **moves** money from your balance into the subkey. Nothing is charged for the move. - The subkey holder can't see your key, your balance or other subkeys, and can't create subkeys. - The minimum to create a subkey is **$2**. An account can have up to **200** active subkeys. - Each subkey gets **60 requests per minute** and **16 concurrent requests**. All your subkeys share a separate total of **600 requests per minute** and **128 concurrent requests**, independent of your main key's [rate limit](https://7api.st/docs/rate-limits). You can manage subkeys in the [dashboard](https://7api.st/subkeys) or through the API with your **main** key. ## Create ```bash curl https://7api.st/v1/subkeys \ -H "Authorization: Bearer YOUR_MAIN_KEY" -H "Content-Type: application/json" \ -d '{"amount_usd": 5, "label": "client-acme"}' ``` ```json { "object": "subkey", "id": "sub_1234", "label": "client-acme", "api_key": "sk-…", "revoked": false, "balance_usd": 5, "spent_usd": 0, "parent_balance_usd": 15 } ``` `label` is optional. It's for your own reference and can be up to 64 characters. ## List and inspect ```bash curl https://7api.st/v1/subkeys -H "Authorization: Bearer YOUR_MAIN_KEY" curl https://7api.st/v1/subkeys/sub_1234 -H "Authorization: Bearer YOUR_MAIN_KEY" ``` ## Top up and withdraw ```bash curl https://7api.st/v1/subkeys/sub_1234/topup \ -H "Authorization: Bearer YOUR_MAIN_KEY" -H "Content-Type: application/json" -d '{"amount_usd": 10}' # Omit the body to withdraw everything curl -X POST https://7api.st/v1/subkeys/sub_1234/withdraw \ -H "Authorization: Bearer YOUR_MAIN_KEY" -H "Content-Type: application/json" -d '{"amount_usd": 3}' ``` ## Revoke ```bash curl -X DELETE https://7api.st/v1/subkeys/sub_1234 -H "Authorization: Bearer YOUR_MAIN_KEY" ``` The key stops working immediately, and any remaining balance returns to you. ## Errors | Status and code | Meaning | |---|---| | `400 amount_below_minimum` | New subkeys need at least $2. | | `400 invalid_amount` | Send a positive `amount_usd`. | | `402 insufficient_balance` | Your main balance is too low. | | `402 insufficient_subkey_balance` | You tried to withdraw more than the subkey holds. | | `404 subkey_not_found` | The ID is wrong, or the subkey belongs to another account. | | `409 subkey_busy` | A request on the subkey is in progress. Retry in a few seconds. | | `409 subkey_revoked` | The subkey was already deleted. | | `409 subkey_limit` | The account already has 200 active subkeys. | --- # Models and pricing Every model available through 7API, with its context window, output limit and price. **Standard** is the USD rate per million input, cache-write and output tokens. **Cached** is the rate per million input tokens served from the [prompt cache](https://7api.st/docs/prompt-caching). The same data is available as JSON from [`GET /v1/models`](https://7api.st/docs/models-endpoint). ## [Gemini](https://7api.st/models/gemini) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Gemini 4 Carbon](https://7api.st/models/gemini-4-carbon) | `gemini-4-carbon` | 1.05M | 16K | $0.50 | $0.50 | $0.05 | | [Gemini 4 Argon](https://7api.st/models/gemini-4-argon) | `gemini-4-argon` | 128K | 16K | $0.30 | $0.30 | $0.05 | ## [GPT](https://7api.st/models/gpt) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [GPT-6 Astra](https://7api.st/models/gpt-6-astra) | `gpt-6-astra` | 1.05M | 128K | $0.65 | $0.65 | $0.06 | | [GPT-6.2 Astra](https://7api.st/models/gpt-6.2-astra) | `gpt-6.2-astra` | 1.05M | 128K | $0.65 | $0.65 | $0.06 | | [GPT-6.1 Sol](https://7api.st/models/gpt-6.1-sol) | `gpt-6.1-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [GPT-6.2 Sol](https://7api.st/models/gpt-6.2-sol) | `gpt-6.2-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [GPT-6 Sol](https://7api.st/models/gpt-6-sol) | `gpt-6-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [GPT-6 Luna](https://7api.st/models/gpt-6-luna) | `gpt-6-luna` | 1.05M | 128K | $0.05 | $0.05 | $0.01 | | [GPT-5.6 Sol](https://7api.st/models/gpt-5.6-sol) | `gpt-5.6-sol` | 1M | 128K | $0.45 | $0.45 | $0.04 | | [GPT-5.6 Terra](https://7api.st/models/gpt-5.6-terra) | `gpt-5.6-terra` | 1M | 128K | $0.45 | $0.45 | $0.04 | | [GPT-5.6 Luna](https://7api.st/models/gpt-5.6-luna) | `gpt-5.6-luna` | 1M | 128K | $0.45 | $0.45 | $0.04 | | [GPT-5.5](https://7api.st/models/gpt-5.5) | `gpt-5.5` | 1M | 128K | $0.45 | $0.45 | $0.04 | ## [Claude](https://7api.st/models/claude) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Claude Fable 5.2](https://7api.st/models/claude-fable-5-2) | `claude-fable-5-2` | 1M | 64K | $0.80 | $0.80 | $0.08 | | [Claude Opus 5.5 Max](https://7api.st/models/claude-opus-5-5-max) | `claude-opus-5-5-max` | 1M | 128K | $0.70 | $0.70 | $0.07 | | [Claude Opus 5.5](https://7api.st/models/claude-opus-5-5) | `claude-opus-5-5` | 1M | 128K | $0.70 | $0.70 | $0.07 | | [Claude Opus 5](https://7api.st/models/claude-opus-5) | `claude-opus-5` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Opus 4.8](https://7api.st/models/claude-opus-4-8) | `claude-opus-4-8` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Opus 4.7](https://7api.st/models/claude-opus-4-7) | `claude-opus-4-7` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Opus 4.6](https://7api.st/models/claude-opus-4-6) | `claude-opus-4-6` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Sonnet 5.5](https://7api.st/models/claude-sonnet-5-5) | `claude-sonnet-5-5` | 1M | 64K | $0.50 | $0.50 | $0.06 | | [Claude Sonnet 5](https://7api.st/models/claude-sonnet-5) | `claude-sonnet-5` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Haiku 5.5](https://7api.st/models/claude-haiku-5-5) | `claude-haiku-5-5` | 1M | 64K | $0.03 | $0.03 | $0.01 | ## [Grok](https://7api.st/models/grok) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Grok 4.7](https://7api.st/models/grok-4.7) | `grok-4.7` | 500K | 66K | $0.10 | $0.10 | $0.02 | | [Grok 4.6](https://7api.st/models/grok-4.6) | `grok-4.6` | 500K | 66K | $0.10 | $0.10 | $0.02 | | [Grok 4.5](https://7api.st/models/grok-4.5) | `grok-4.5` | 200K | 64K | $0.10 | $0.10 | $0.02 | ## [DeepSeek](https://7api.st/models/deepseek) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [DeepSeek V4.1 Flash](https://7api.st/models/deepseek-v4.1-flash) | `deepseek-v4.1-flash` | 1M | 66K | $0.02 | $0.02 | $0.005 | | [DeepSeek V4.1 Flash 1017](https://7api.st/models/deepseek-v4.1-flash-1017) | `deepseek-v4.1-flash-1017` | 1M | 66K | $0.02 | $0.02 | $0.005 | | [DeepSeek V4.1 Flash 1017 HQ](https://7api.st/models/deepseek-v4.1-flash-1017-hq) | `deepseek-v4.1-flash-1017-hq` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [DeepSeek V4.1 Flash 1017 Abliterated](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated) | `deepseek-v4.1-flash-1017-abliterated` | 1M | 66K | $0.15 | $0.15 | $0.05 | | [DeepSeek V4.1 Flash 1017 Abliterated Fast](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated-fast) | `deepseek-v4.1-flash-1017-abliterated-fast` | 1M | 66K | $0.70 | $0.70 | $0.16 | | [DeepSeek V4 Flash](https://7api.st/models/deepseek-v4-flash-0731) | `deepseek-v4-flash-0731` | 1M | 66K | $0.03 | $0.03 | $0.0027 | | [DeepSeek V4 Pro](https://7api.st/models/deepseek-v4-pro-0813) | `deepseek-v4-pro-0813` | 1M | 66K | $0.25 | $0.25 | $0.05 | ## [GLM](https://7api.st/models/glm) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [GLM 5.2](https://7api.st/models/glm-5.2) | `glm-5.2` | 1M | 66K | $0.06 | $0.06 | $0.017 | | [GLM 5.3](https://7api.st/models/glm-5.3) | `glm-5.3` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [GLM 5.3 Uncensored](https://7api.st/models/glm-5.3-uncensored) | `glm-5.3-uncensored` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [GLM 5.3 Flash](https://7api.st/models/glm-5.3-flash) | `glm-5.3-flash` | 1M | 66K | $0.025 | $0.025 | $0.0025 | | [GLM 5.3 Flash Uncensored](https://7api.st/models/glm-5.3-flash-uncensored) | `glm-5.3-flash-uncensored` | 1M | 66K | $0.025 | $0.025 | $0.0025 | | [GLM 5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) | `glm-5.3-abliterated` | 1M | 130K | $0.80 | $0.80 | $0.25 | ## [Kimi](https://7api.st/models/kimi) | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Kimi K3](https://7api.st/models/kimi-k3) | `kimi-k3` | 1M | 66K | $0.15 | $0.15 | $0.03 | | [Kimi K3.1 Pro](https://7api.st/models/kimi-k3.1-pro) | `kimi-k3.1-pro` | 1M | 32K | $0.30 | $0.30 | $0.05 | ## How billing works You pay per token from a prepaid USD balance. There's no subscription. Top-ups start at $5, with up to 16% bonus credit on larger amounts. See [Pricing and billing](https://7api.st/docs/pricing-and-billing). *Prices last checked 2026-11-20.* --- # Claude API access Call Anthropic's Claude models through 7API with the Anthropic Messages API or the OpenAI Chat Completions API. Claude Code, the Anthropic SDK and Claude-compatible tools work with two settings changed, and the same key also covers every other family in the catalog. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Claude Fable 5.2](https://7api.st/models/claude-fable-5-2) | `claude-fable-5-2` | 1M | 64K | $0.80 | $0.80 | $0.08 | | [Claude Opus 5.5 Max](https://7api.st/models/claude-opus-5-5-max) | `claude-opus-5-5-max` | 1M | 128K | $0.70 | $0.70 | $0.07 | | [Claude Opus 5.5](https://7api.st/models/claude-opus-5-5) | `claude-opus-5-5` | 1M | 128K | $0.70 | $0.70 | $0.07 | | [Claude Opus 5](https://7api.st/models/claude-opus-5) | `claude-opus-5` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Opus 4.8](https://7api.st/models/claude-opus-4-8) | `claude-opus-4-8` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Opus 4.7](https://7api.st/models/claude-opus-4-7) | `claude-opus-4-7` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Opus 4.6](https://7api.st/models/claude-opus-4-6) | `claude-opus-4-6` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Sonnet 5.5](https://7api.st/models/claude-sonnet-5-5) | `claude-sonnet-5-5` | 1M | 64K | $0.50 | $0.50 | $0.06 | | [Claude Sonnet 5](https://7api.st/models/claude-sonnet-5) | `claude-sonnet-5` | 1M | 64K | $0.50 | $0.50 | $0.05 | | [Claude Haiku 5.5](https://7api.st/models/claude-haiku-5-5) | `claude-haiku-5-5` | 1M | 64K | $0.03 | $0.03 | $0.01 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - Supports adaptive thinking and the `low` to `max` effort scale (`claude-opus-4-6` stops at `max` without `xhigh`). - Every Claude model has a 1M-token context window. In Claude Code, the `[1m]` suffix turns on the 1M-context beta. - Prompt caching works on every Claude model, and `cache_control` breakpoints are passed through unchanged. - `claude-sonnet-5-5` is served on `/v1/messages` only. The other Claude models also work on Chat Completions and Responses. ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "claude-fable-5-2", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`claude-opus-5-5`](https://7api.st/models/claude-opus-5-5) | 58 | max | | [`claude-sonnet-5-5`](https://7api.st/models/claude-sonnet-5-5) | 56 | max | | [`claude-haiku-5-5`](https://7api.st/models/claude-haiku-5-5) | 43 | max | ## Do I need an Anthropic account to use Claude through 7API? No. You use a 7API key with base URL `https://7api.st`. Billing is per token from your 7API balance. ## Which Claude model should I use for coding? `claude-opus-5-5` scores highest on the Artificial Analysis Intelligence Index (58 at `max` effort) and suits hard, multi-step tasks. `claude-haiku-5-5` is far cheaper for quick edits. See the [benchmarks](https://7api.st/benchmarks). ## Does Claude Code work with 7API? Yes. Set `ANTHROPIC_BASE_URL` to `https://7api.st` and `ANTHROPIC_AUTH_TOKEN` to your key. See the [Claude Code guide](https://7api.st/docs/guides/claude-code). --- # GPT-6 API access Use OpenAI's GPT-6 and GPT-5.6 models through 7API with the Responses API (the format Codex uses) or Chat Completions. You don't need an OpenAI account. Point the SDK or tool at `https://7api.st/v1` and use your 7API key. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [GPT-6 Astra](https://7api.st/models/gpt-6-astra) | `gpt-6-astra` | 1.05M | 128K | $0.65 | $0.65 | $0.06 | | [GPT-6.2 Astra](https://7api.st/models/gpt-6.2-astra) | `gpt-6.2-astra` | 1.05M | 128K | $0.65 | $0.65 | $0.06 | | [GPT-6.1 Sol](https://7api.st/models/gpt-6.1-sol) | `gpt-6.1-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [GPT-6.2 Sol](https://7api.st/models/gpt-6.2-sol) | `gpt-6.2-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [GPT-6 Sol](https://7api.st/models/gpt-6-sol) | `gpt-6-sol` | 1.05M | 128K | $0.15 | $0.15 | $0.04 | | [GPT-6 Luna](https://7api.st/models/gpt-6-luna) | `gpt-6-luna` | 1.05M | 128K | $0.05 | $0.05 | $0.01 | | [GPT-5.6 Sol](https://7api.st/models/gpt-5.6-sol) | `gpt-5.6-sol` | 1M | 128K | $0.45 | $0.45 | $0.04 | | [GPT-5.6 Terra](https://7api.st/models/gpt-5.6-terra) | `gpt-5.6-terra` | 1M | 128K | $0.45 | $0.45 | $0.04 | | [GPT-5.6 Luna](https://7api.st/models/gpt-5.6-luna) | `gpt-5.6-luna` | 1M | 128K | $0.45 | $0.45 | $0.04 | | [GPT-5.5](https://7api.st/models/gpt-5.5) | `gpt-5.5` | 1M | 128K | $0.45 | $0.45 | $0.04 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - The GPT-6 models have a 1,050,000-token context window and 128K output. - GPT-6 models accept image input. - Reasoning effort ranges from `none` to `max`. On `gpt-6.1-sol`, `max` becomes `xhigh`. - Codex CLI works with a five-line provider block. See the [Codex guide](https://7api.st/docs/guides/codex). ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "gpt-6-astra", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`gpt-6-astra`](https://7api.st/models/gpt-6-astra) | 53 | max | | [`gpt-6.1-sol`](https://7api.st/models/gpt-6.1-sol) | 52 | max | | [`gpt-6-luna`](https://7api.st/models/gpt-6-luna) | 38 | max | | [`gpt-5.6-terra`](https://7api.st/models/gpt-5.6-terra) | 42 | max | ## Is this the official OpenAI API? No. 7API is an independent gateway that serves GPT models through OpenAI-compatible endpoints. You use a 7API key and pay from a 7API balance. ## Which GPT model is cheapest? Check the table above: the build lists the current rates. GPT-6 Luna is the lowest-cost GPT-6 model. ## Does `previous_response_id` work? Yes, on GPT models. It accepts IDs returned to your own account for the same model. --- # GLM-5.3 API access Zhipu AI's GLM-5.3 family has a 1M-token context window, strong tool calling and very low per-token rates. The family comes in standard, Flash (faster and cheaper), Uncensored and Abliterated versions. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [GLM 5.2](https://7api.st/models/glm-5.2) | `glm-5.2` | 1M | 66K | $0.06 | $0.06 | $0.017 | | [GLM 5.3](https://7api.st/models/glm-5.3) | `glm-5.3` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [GLM 5.3 Uncensored](https://7api.st/models/glm-5.3-uncensored) | `glm-5.3-uncensored` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [GLM 5.3 Flash](https://7api.st/models/glm-5.3-flash) | `glm-5.3-flash` | 1M | 66K | $0.025 | $0.025 | $0.0025 | | [GLM 5.3 Flash Uncensored](https://7api.st/models/glm-5.3-flash-uncensored) | `glm-5.3-flash-uncensored` | 1M | 66K | $0.025 | $0.025 | $0.0025 | | [GLM 5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) | `glm-5.3-abliterated` | 1M | 130K | $0.80 | $0.80 | $0.25 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - All GLM-5.3 models have a 1M-token context window. The abliterated models allow up to 130,000 output tokens. - Works with Chat Completions, Responses and Anthropic Messages, so Claude Code can run GLM models as `claude-glm-5.3`. - Effort: `low`, `high`, `xhigh` and `max` on the standard and uncensored models (default `high`), and `high` and above on abliterated. - GLM-5.3 at `max` effort scores 45 on the Artificial Analysis Intelligence Index, among the highest open-weights models. See the [benchmarks](https://7api.st/benchmarks). ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "glm-5.2", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`glm-5.3`](https://7api.st/models/glm-5.3) | 45 | max | | [`glm-5.3-flash`](https://7api.st/models/glm-5.3-flash) | 42 | default | ## What is the difference between GLM-5.3 Uncensored and GLM-5.3 Abliterated? Both refuse less often than standard GLM-5.3. "Abliterated" refers to a weight-level change that removes the model's refusal direction. "Uncensored" is the broader label for a variant with fewer refusals. See [Uncensored AI API](https://7api.st/uncensored-ai-api) for details. ## Can I use GLM-5.3 in Claude Code? Yes. Run `/model claude-glm-5.3`, or any GLM ID with a `claude-` prefix. ## How much does GLM-5.3 cost? The rates are in the table above, per million tokens, with a separate lower rate for cached input. --- # DeepSeek API access DeepSeek's V4 and V4.1 models through 7API: V4.1 Flash for very cheap, fast agent work, V4.1 Flash 1017 with image input, V4 Pro for harder reasoning, and uncensored and abliterated variants. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [DeepSeek V4.1 Flash](https://7api.st/models/deepseek-v4.1-flash) | `deepseek-v4.1-flash` | 1M | 66K | $0.02 | $0.02 | $0.005 | | [DeepSeek V4.1 Flash 1017](https://7api.st/models/deepseek-v4.1-flash-1017) | `deepseek-v4.1-flash-1017` | 1M | 66K | $0.02 | $0.02 | $0.005 | | [DeepSeek V4.1 Flash 1017 HQ](https://7api.st/models/deepseek-v4.1-flash-1017-hq) | `deepseek-v4.1-flash-1017-hq` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [DeepSeek V4.1 Flash 1017 Abliterated](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated) | `deepseek-v4.1-flash-1017-abliterated` | 1M | 66K | $0.15 | $0.15 | $0.05 | | [DeepSeek V4.1 Flash 1017 Abliterated Fast](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated-fast) | `deepseek-v4.1-flash-1017-abliterated-fast` | 1M | 66K | $0.70 | $0.70 | $0.16 | | [DeepSeek V4 Flash](https://7api.st/models/deepseek-v4-flash-0731) | `deepseek-v4-flash-0731` | 1M | 66K | $0.03 | $0.03 | $0.0027 | | [DeepSeek V4 Pro](https://7api.st/models/deepseek-v4-pro-0813) | `deepseek-v4-pro-0813` | 1M | 66K | $0.25 | $0.25 | $0.05 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - All DeepSeek models have a 1M-token context window and 64K output. - `deepseek-v4.1-flash-1017`, `deepseek-v4.1-flash-1017-hq` and `deepseek-v4.1-flash-1017-abliterated-fast` accept images. Text-only DeepSeek models replace each image with a text placeholder instead of failing the request. - Effort is `low`, `medium` or `high`. The standard abliterated model also accepts `none` and `max`. - Short names resolve to the dated model, for example `deepseek-v4-pro` becomes `deepseek-v4-pro-0813`. ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "deepseek-v4.1-flash", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`deepseek-v4.1-flash-1017`](https://7api.st/models/deepseek-v4.1-flash-1017) | 45 | max | | [`deepseek-v4-pro-0813`](https://7api.st/models/deepseek-v4-pro-0813) | 36 | max | ## Which DeepSeek model is the cheapest? DeepSeek V4.1 Flash and V4.1 Flash 1017 have the lowest rates in the catalog. See the table above. ## Is there an uncensored DeepSeek API? Yes. `deepseek-v4.1-flash-1017-abliterated` and `deepseek-v4.1-flash-1017-abliterated-fast` are publicly available. --- # Kimi K3 API access Moonshot AI's Kimi K3 and K3.1 Pro through 7API. Both are always-reasoning models with a 1M-token context window, and K3.1 Pro adds image input. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Kimi K3](https://7api.st/models/kimi-k3) | `kimi-k3` | 1M | 66K | $0.15 | $0.15 | $0.03 | | [Kimi K3.1 Pro](https://7api.st/models/kimi-k3.1-pro) | `kimi-k3.1-pro` | 1M | 32K | $0.30 | $0.30 | $0.05 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - Reasoning effort is `low`, `high` or `max`, and defaults to `max`. Reasoning can't be turned off: `none` maps to `low`. - An unknown effort value returns `400 invalid_reasoning_effort` instead of being silently ignored. - `kimi-k3.1-pro` accepts images but doesn't enforce strict JSON-schema output. Validate JSON on your side. - Raw-API alias: `cb/kimi-k3.1-pro`. ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "kimi-k3", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`kimi-k3.1-pro`](https://7api.st/models/kimi-k3.1-pro) | 55 | default | ## How do I change Kimi's reasoning effort in OpenCode? The generated config defines `low`, `high` and `max` variants. Cycle through them with Ctrl+T. --- # Grok API access xAI's Grok 4.x models through 7API, with the same key and base URL as every other family. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Grok 4.7](https://7api.st/models/grok-4.7) | `grok-4.7` | 500K | 66K | $0.10 | $0.10 | $0.02 | | [Grok 4.6](https://7api.st/models/grok-4.6) | `grok-4.6` | 500K | 66K | $0.10 | $0.10 | $0.02 | | [Grok 4.5](https://7api.st/models/grok-4.5) | `grok-4.5` | 200K | 64K | $0.10 | $0.10 | $0.02 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - Grok 4.7 and 4.6 have a 500K-token context window. Grok 4.5 has 200K. - Use Chat Completions in OpenAI-format tools, or `claude-grok-4.7` in Claude Code. ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "grok-4.7", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`grok-4.7`](https://7api.st/models/grok-4.7) | 46 | xhigh | --- # Gemini API access Google's Gemini 4 Carbon and Argon through 7API, usable from OpenAI-format and Anthropic-format clients. | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [Gemini 4 Carbon](https://7api.st/models/gemini-4-carbon) | `gemini-4-carbon` | 1.05M | 16K | $0.50 | $0.50 | $0.05 | | [Gemini 4 Argon](https://7api.st/models/gemini-4-argon) | `gemini-4-argon` | 128K | 16K | $0.30 | $0.30 | $0.05 | *Rates are in USD per million tokens. Last checked 2026-11-20.* ## What to know - Accepts image input. - Carbon advertises 1,048,576 context tokens; Argon uses a conservative 128K client default. ## Quick start ```bash title="curl" curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "gemini-4-carbon", "messages": [{"role": "user", "content": "Hello"}]}' ``` Set the base URL to `https://7api.st/v1` for OpenAI-format clients, or `https://7api.st` for Anthropic-format clients. See the [quickstart](https://7api.st/docs/quickstart) for SDK examples. ## Independent benchmarks Scores published by third parties, not by 7API. See [all benchmarks](https://7api.st/benchmarks) for sources and method. | Model | Artificial Analysis Intelligence Index | Effort | |---|--:|---| | [`gemini-4-argon`](https://7api.st/models/gemini-4-argon) | 53 | high | --- # Uncensored AI API 7API is an **uncensored AI API**: one key for 5 uncensored and abliterated language models, alongside 35 standard models from Claude, GPT, GLM, DeepSeek and Kimi. They use the same base URL and the same OpenAI- and Anthropic-compatible request formats, so any SDK, agent or chat app that speaks the OpenAI API can use them. Billing is per token from a prepaid balance, with no subscription and no content-filter layer added by the gateway. - **OpenAI-compatible base URL:** `https://7api.st/v1` - **Anthropic-compatible base URL:** `https://7api.st` (works in Claude Code) - **Context window:** 1M tokens on every uncensored model - **Prices:** from $0.025 per million tokens ## Uncensored and abliterated models {#models} | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [DeepSeek V4.1 Flash 1017 Abliterated](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated) | `deepseek-v4.1-flash-1017-abliterated` | 1M | 66K | $0.15 | $0.15 | $0.05 | | [DeepSeek V4.1 Flash 1017 Abliterated Fast](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated-fast) | `deepseek-v4.1-flash-1017-abliterated-fast` | 1M | 66K | $0.70 | $0.70 | $0.16 | | [GLM 5.3 Uncensored](https://7api.st/models/glm-5.3-uncensored) | `glm-5.3-uncensored` | 1M | 66K | $0.05 | $0.05 | $0.01 | | [GLM 5.3 Flash Uncensored](https://7api.st/models/glm-5.3-flash-uncensored) | `glm-5.3-flash-uncensored` | 1M | 66K | $0.025 | $0.025 | $0.0025 | | [GLM 5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) | `glm-5.3-abliterated` | 1M | 130K | $0.80 | $0.80 | $0.25 | ## Which uncensored model should I use? {#compare} | Model | Type | Based on | Input / 1M | Output / 1M | Cached / 1M | Max output | Reasoning effort | |---|---|---|--:|--:|--:|--:|---| | [DeepSeek V4.1 Flash 1017 Abliterated](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated) | Abliterated | [DeepSeek V4.1 Flash 1017](https://7api.st/models/deepseek-v4.1-flash-1017) | $0.15 | $0.15 | $0.05 | 66K | `none` `low` `high` `max` | | [DeepSeek V4.1 Flash 1017 Abliterated Fast](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated-fast) | Abliterated | [DeepSeek V4.1 Flash 1017](https://7api.st/models/deepseek-v4.1-flash-1017) | $0.70 | $0.70 | $0.16 | 66K | model default | | [GLM 5.3 Uncensored](https://7api.st/models/glm-5.3-uncensored) | Uncensored | [GLM 5.3](https://7api.st/models/glm-5.3) | $0.05 | $0.05 | $0.01 | 66K | `low` `high` `xhigh` `max` | | [GLM 5.3 Flash Uncensored](https://7api.st/models/glm-5.3-flash-uncensored) | Uncensored | [GLM 5.3 Flash](https://7api.st/models/glm-5.3-flash) | $0.025 | $0.025 | $0.0025 | 66K | `low` `high` `xhigh` `max` | | [GLM 5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) | Abliterated | [GLM 5.3](https://7api.st/models/glm-5.3) | $0.80 | $0.80 | $0.25 | 130K | `high` `xhigh` `max` | - **Fewest refusals:** [GLM-5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated), the flagship abliterated model. - **Lowest cost:** [GLM-5.3 Flash Uncensored](https://7api.st/models/glm-5.3-flash-uncensored), for high-volume work. - **Best value for agents and coding:** [GLM-5.3 Uncensored](https://7api.st/models/glm-5.3-uncensored), at the same rate as standard GLM-5.3. - **Strongest reasoning:** [GLM-5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) at `max` effort. - **Adjustable thinking:** [DeepSeek V4.1 Flash Abliterated](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated), from `none` to `max`. ## Abliterated vs. uncensored {#terms} - **Abliterated** models have been changed at the weight level. The direction in the model's activations that drives refusals is identified and removed, and everything else is left as it was. The model keeps its general capability but is much less likely to decline a request. Read [how abliteration works](https://7api.st/abliterated-ai). - **Uncensored** is the broader label for any variant tuned to refuse less often, whether through abliteration, fine-tuning or system-level configuration. Neither label guarantees zero refusals. Behavior varies by prompt and model version, so test with your own prompts before you rely on one. ## Call the uncensored AI API {#quickstart} ```bash tab=curl curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-abliterated", "messages": [{"role": "user", "content": "…"}]}' ``` ```python tab=Python from openai import OpenAI client = OpenAI(base_url="https://7api.st/v1", api_key="YOUR_7API_KEY") r = client.chat.completions.create( model="glm-5.3-uncensored", messages=[{"role": "user", "content": "…"}], ) print(r.choices[0].message.content) ``` ```javascript tab=Node.js import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://7api.st/v1", apiKey: process.env.SEVENAPI_API_KEY }); const r = await client.chat.completions.create({ model: "deepseek-v4.1-flash-1017-abliterated", messages: [{ role: "user", content: "…" }], }); console.log(r.choices[0].message.content); ``` Every model above also works on `/v1/messages`, so it runs in Claude Code as `claude-glm-5.3-abliterated`, and on `/v1/responses`. Ready-made [OpenCode](https://7api.st/docs/guides/opencode) and [Oh My Pi](https://7api.st/docs/guides/oh-my-pi) configs include them with the right effort settings. Any chat app or agent that lets you set an OpenAI base URL and key works too. ## Why use an uncensored LLM API {#why} - **No GPUs or weights to manage.** Frontier-size uncensored models need multi-GPU servers. Here you pay per token. - **Switch models with one string.** Compare uncensored and standard models on the same prompts with the same key. - **Long context and caching.** 1M-token context, and repeated input is billed at a much lower [cached rate](https://7api.st/docs/prompt-caching). - **Private sign-up.** No email is needed, and you can pay with crypto. ## Responsible use {#use} Using a model with fewer refusals doesn't change what's legal. Typical uses are security research, red-teaming and evaluating refusal behavior, fiction, and research on sensitive topics where standard models refuse too often. You're responsible for how you use the output. ## Is there a free uncensored AI API? No. 7API is pay per token with a $5 minimum top-up. Rates start at $0.025 per million tokens, so a small top-up covers a lot of testing. ## Is the uncensored AI API OpenAI-compatible? Yes. Set the base URL to `https://7api.st/v1` and use your 7API key with the OpenAI SDK or any OpenAI-compatible tool. Anthropic-format clients use `https://7api.st`. ## Do uncensored models still refuse? Sometimes. Abliterated models refuse least, but no model is guaranteed to answer every prompt. Results vary by prompt, model and reasoning effort. ## How do uncensored models compare on benchmarks? Independent leaderboards don't test uncensored builds. The [benchmarks](https://7api.st/benchmarks) page lists scores for the base models (GLM-5.3, DeepSeek V4 Pro) they're derived from. ## More - [What is abliterated AI?](https://7api.st/abliterated-ai) - [GLM-5.3 Abliterated on GitHub](https://github.com/7API/glm-5.3-abliterated): model guide and evaluation prompts. - [Uncensored AI API guide on GitHub](https://github.com/7API/uncensored-ai-api). --- # Abliterated AI An **abliterated** model is a language model whose refusal behavior has been removed by editing its weights directly, without retraining. The name combines "ablate" and "obliterate". 7API serves abliterated models, including [GLM-5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated), through an OpenAI- and Anthropic-compatible API, so you can use one without downloading weights or renting GPUs. ## How abliteration works The technique comes from research showing that refusals in many chat models are driven by a single direction in the model's internal activations ([Arditi et al., 2024, "Refusal in Language Models Is Mediated by a Single Direction"](https://arxiv.org/abs/2406.11717)). Abliteration uses that finding in three steps: 1. **Find the refusal direction.** Run the model on a set of prompts it refuses and a set it answers, record the activations at each layer, and take the difference of the averages. That difference vector is the refusal direction. 2. **Remove it from the weights.** Orthogonalize the matrices that write into the model's residual stream against that direction, so the model can no longer represent "I should refuse" in that way. 3. **Check the result.** Measure the refusal rate and general benchmarks again. Some builds add a short fine-tune afterward to recover any lost quality. Because only one direction is removed, the rest of the model (its knowledge, reasoning and tool use) is left largely as it was. The method was popularized for open-weights models in 2024, for example in the Hugging Face write-up ["Uncensor any LLM with abliteration"](https://huggingface.co/blog/mlabonne/abliteration). ## Abliterated vs. uncensored vs. jailbreaks | | Abliterated | Uncensored (general) | Jailbreak prompt | |---|---|---|---| | What changes | The weights: the refusal direction is removed | Varies: abliteration, fine-tuning or system-level configuration | Only the prompt | | Works across prompts | Yes, built into the model | Usually | Fragile, breaks with model updates | | Extra prompt tokens | None | None or a few | Often long, on every request | | Effect on capability | Small. Some builds recover it with a short fine-tune | Depends on the method | None, but the model may still refuse | "Uncensored" is the umbrella term. Every abliterated model is uncensored, but not every uncensored model is abliterated. See [Uncensored AI API](https://7api.st/uncensored-ai-api) for the full list of both kinds on 7API. ## What to expect - **Fewer refusals, not zero.** Abliteration removes the main refusal mechanism. Some prompts may still produce a hedge or a disclaimer, and behavior varies between builds. - **Similar capability.** Reasoning, coding and long-context work stay close to the base model. Leaderboards don't test abliterated builds, so evaluate on your own tasks. - **No built-in safety layer.** The model won't stop you from generating harmful content. You're responsible for how the output is used, and the law applies as usual. ## Abliterated models on 7API | Model | ID | Context | Max output | Input / 1M | Output / 1M | Cached / 1M | |---|---|--:|--:|--:|--:|--:| | [DeepSeek V4.1 Flash 1017 Abliterated](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated) | `deepseek-v4.1-flash-1017-abliterated` | 1M | 66K | $0.15 | $0.15 | $0.05 | | [DeepSeek V4.1 Flash 1017 Abliterated Fast](https://7api.st/models/deepseek-v4.1-flash-1017-abliterated-fast) | `deepseek-v4.1-flash-1017-abliterated-fast` | 1M | 66K | $0.70 | $0.70 | $0.16 | | [GLM 5.3 Abliterated](https://7api.st/models/glm-5.3-abliterated) | `glm-5.3-abliterated` | 1M | 130K | $0.80 | $0.80 | $0.25 | All of them have a 1M-token context window and work on Chat Completions, Responses and Anthropic Messages, so they run in Claude Code, OpenCode, Codex, Cursor and other OpenAI-compatible tools. ## Call an abliterated model ```bash curl https://7api.st/v1/chat/completions \ -H "Authorization: Bearer $SEVENAPI_API_KEY" -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-abliterated", "messages": [{"role": "user", "content": "…"}]}' ``` In Claude Code, run `/model claude-glm-5.3-abliterated`. The abliterated GLM models always think, at `high` effort or above. Send `"reasoning_effort": "xhigh"` or `"max"` for harder tasks. See [Reasoning effort](https://7api.st/docs/reasoning-effort). ## Why use an API instead of running it locally Abliterated weights for small models can run on a desktop GPU. Frontier-size models such as GLM-5.3 need a multi-GPU server to run at useful speed with a long context. Through an API you pay per token, with cached input billed at a lower rate, and switch between abliterated, uncensored and standard models by changing one string. ## Common uses - **Security research and red-teaming:** generating test cases and attack scenarios that standard models refuse. - **Refusal research:** comparing how models with and without refusal behavior handle the same prompts. - **Fiction and creative writing** with mature or dark themes. - **Research on sensitive topics** such as medicine, drugs and extremism, where standard models over-refuse. ## Is abliterated AI legal? Using a model with fewer refusals is legal in most places. What you generate with it is still subject to the law where you live. Abliteration changes what the model will answer, not what is allowed. ## What does "abliterated" mean? It means the model's refusal direction has been identified and removed from its weights. The word blends "ablation", removing part of a network to study its effect, with "obliterate". ## Is GLM-5.3 Abliterated the same as GLM-5.3 Uncensored? No. Both refuse less than standard GLM-5.3. GLM-5.3 Abliterated is the weight-edited build with the largest output budget (130,000 tokens). GLM-5.3 Uncensored costs much less and is the better choice when you need volume. See the [comparison](https://7api.st/uncensored-ai-api#compare). ## Do abliterated models score lower on benchmarks? Usually slightly, by a few points on most suites, and some builds recover that with a short fine-tune afterward. Independent leaderboards don't list abliterated builds, so the [benchmarks](https://7api.st/benchmarks) page shows the base models only. --- # LLM benchmarks: intelligence and price Independent benchmark results for the models available on 7API, from the **Artificial Analysis Intelligence Index**, shown next to each model's 7API price. 7API doesn't run these evaluations. Every score links to its public source. ## Highlights - **Claude Opus 5.5** has the highest Artificial Analysis Intelligence Index score in the catalog: **58** at `max` effort, the top score on the whole index. - **DeepSeek V4.1 Flash 1017** gives the most index points per dollar: a score of 45 at $0.02 per million tokens. - 6 models in the catalog score 50 or higher on the index, including Kimi K3.1 Pro, Gemini 4 Argon, GPT-6 Astra, GPT-6.1 Sol. ## Artificial Analysis Intelligence Index {#intelligence} A composite of ten evaluations run independently by Artificial Analysis: AA-Briefcase, GDPval-AA, AutomationBench-AA, Terminal-Bench 4.0, SciCode, Humanity's Last Exam, GDP.pdf, CritPt, AA-Omniscience and AA-LCR. It covers agentic work, coding, science, reasoning and long-context retrieval. Higher is better. The top score at the time of retrieval was 58. Each model is shown at its best-scoring effort level. [Source](https://artificialanalysis.ai/evaluations/artificial-analysis-intelligence-index) · v4.3.2, retrieved 2026-10-24. | Model | Score | Effort | 7API price / 1M | Context | |---|--:|---|--:|--:| | [Claude Opus 5.5](https://7api.st/models/claude-opus-5-5) | **58** | max | $0.70 | 1M | | [Claude Sonnet 5.5](https://7api.st/models/claude-sonnet-5-5) | **56** | max | $0.50 | 1M | | [Kimi K3.1 Pro](https://7api.st/models/kimi-k3.1-pro) | **55** | default | $0.30 | 1M | | [Gemini 4 Argon](https://7api.st/models/gemini-4-argon) | **53** | high | $0.30 | 128K | | [GPT-6 Astra](https://7api.st/models/gpt-6-astra) | **53** | max | $0.65 | 1.05M | | [GPT-6.1 Sol](https://7api.st/models/gpt-6.1-sol) | **52** | max | $0.15 | 1.05M | | [Grok 4.7](https://7api.st/models/grok-4.7) | **46** | xhigh | $0.10 | 500K | | [DeepSeek V4.1 Flash 1017](https://7api.st/models/deepseek-v4.1-flash-1017) | **45** | max | $0.02 | 1M | | [GLM 5.3](https://7api.st/models/glm-5.3) | **45** | max | $0.05 | 1M | | [Claude Haiku 5.5](https://7api.st/models/claude-haiku-5-5) | **43** | max | $0.03 | 1M | | [GLM 5.3 Flash](https://7api.st/models/glm-5.3-flash) | **42** | default | $0.025 | 1M | | [GPT-5.6 Terra](https://7api.st/models/gpt-5.6-terra) | **42** | max | $0.45 | 1M | | [GPT-6 Luna](https://7api.st/models/gpt-6-luna) | **38** | max | $0.05 | 1.05M | | [DeepSeek V4 Pro](https://7api.st/models/deepseek-v4-pro-0813) | **36** | max | $0.25 | 1M | ### Score by effort level Reasoning effort changes the score a lot. The index lists the same model at several effort levels, and 7API accepts all of them (see [Reasoning effort](https://7api.st/docs/reasoning-effort)). | Model | `max` | `xhigh` | `high` | `medium` | `low` | |---|--:|--:|--:|--:|--:| | [Claude Opus 5.5](https://7api.st/models/claude-opus-5-5) | 58 | 56 | 54 | 51 | 42 | | [Claude Sonnet 5.5](https://7api.st/models/claude-sonnet-5-5) | 56 | 52 | 47 | 41 | 36 | | [GPT-6 Astra](https://7api.st/models/gpt-6-astra) | 53 | 52 | 51 | 50 | 46 | | [GPT-6.1 Sol](https://7api.st/models/gpt-6.1-sol) | 52 | 51 | 50 | 48 | 42 | | [Grok 4.7](https://7api.st/models/grok-4.7) | — | 46 | 46 | — | 42 | | [Claude Haiku 5.5](https://7api.st/models/claude-haiku-5-5) | 43 | 41 | 38 | 34 | 29 | | [GPT-5.6 Terra](https://7api.st/models/gpt-5.6-terra) | 42 | 38 | 34 | 30 | 27 | | [GPT-6 Luna](https://7api.st/models/gpt-6-luna) | 38 | 35 | 33 | 30 | 22 | ## Capability per dollar {#value} Intelligence Index score plotted against the 7API standard rate (input and output cost the same per token). ## Method and caveats {#method} - **Third-party data only.** Scores are copied from each publisher's public leaderboard on 2026-10-24. 7API doesn't run, weight or adjust them. Check the source links for the latest numbers. - **Matching models.** A model appears only where the publisher lists the same model and version that 7API serves. Variants a leaderboard doesn't test (uncensored and abliterated builds, for example) are left out instead of being given a base model's score. - **Effort matters.** Artificial Analysis tests several effort levels. The headline is the best level. Send the matching `reasoning_effort` to get comparable results. - **Benchmarks aren't your workload.** Indexes summarize broad task suites. Test on your own prompts. A small top-up is enough to compare models side by side. *Last updated 2026-10-24.*