Claude Opus 4.8 API — Access via an AI API Gateway
Call Anthropic's flagship Claude Opus 4.8 through byesu — an AI API gateway with both Anthropic-native and OpenAI-compatible endpoints. One key covers Claude, GPT-5.6, Grok, Gemini and more, billed pay-as-you-go with no subscription. Claude Code connects with two environment variables, and the official model is served with no quality degradation.
What It Is · How Pricing Works
Claude Opus 4.8 is Anthropic's flagship model and the reference pick for the hardest coding and agentic tasks — deep multi-file refactors, architecture work, and long-horizon agent runs. It supports extended thinking with Effort Control: an adjustable thinking depth that lets you trade reasoning effort against token usage per request, instead of paying flagship-depth reasoning tax on every trivial call.
Anthropic's official list price for Opus 4.8 is $5 / million input tokens and $25 / million output tokens — see Anthropic's official pricing page for current numbers, prompt-caching rates, and batch rates.
byesu serves the official model and bills per token using group multipliers — the same 1 : 5 : 0.1 input / output / cache-hit pricing structure as official:
| Billing Item | Multiplier |
|---|---|
| Input | 1x |
| Output | 5x |
| Cache hit | 0.1x |
Multipliers are coefficients relative to the model's base price. You pay a fraction of the official list price — the console shows your live billed price next to the official list price, and it follows automatically whenever multipliers change. Cache hits bill at only 0.1x, which is decisive for agents that re-read the same repo context every turn.
Pick the right group when creating a token
Before calling claude-opus-4-8, go to Console → Tokens and create a token in a Claude group. Using the wrong group triggers a "no available channel" error. See Choosing a Group for details.
Use Claude Opus 4.8 in Claude Code via byesu
Claude Code talks to Anthropic's Messages API, and byesu exposes an Anthropic-native /v1/messages endpoint — so redirecting it takes two environment variables (plus an optional default model):
# Add to ~/.zshrc or ~/.bashrc; reopen the terminal to apply
export ANTHROPIC_BASE_URL="https://byesu.com"
export ANTHROPIC_API_KEY="sk-YOUR_TOKEN"
export ANTHROPIC_MODEL="claude-opus-4-8" # optional: set the default modelStart claude and every session runs Opus 4.8 through byesu. On Windows PowerShell use setx instead of export. Note the base URL is https://byesu.com without /v1 — only the OpenAI-compatible format includes /v1. Full walkthrough (including a one-click script): Claude Code CLI Setup.
How to Call It
The Base URL depends on the API format:
- Anthropic native (
/v1/messages) →https://byesu.com - OpenAI-compatible (
/v1/chat/completions) →https://byesu.com/v1
The auth header is always Authorization: Bearer sk-your-token.
Option 1: Anthropic native /v1/messages
curl https://byesu.com/v1/messages \
-H "Authorization: Bearer sk-YOUR_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 2048,
"messages": [
{"role": "user", "content": "Review this design: a job queue where workers poll a Postgres table with SELECT ... FOR UPDATE SKIP LOCKED. What are the failure modes?"}
]
}'Option 2: OpenAI-compatible /v1/chat/completions
Existing OpenAI SDK code needs only a base_url and key swap:
from openai import OpenAI
client = OpenAI(
api_key="sk-YOUR_TOKEN",
base_url="https://byesu.com/v1", # OpenAI-compatible format includes /v1
)
resp = client.chat.completions.create(
model="claude-opus-4-8",
messages=[
{"role": "user", "content": "Explain the difference between optimistic and pessimistic locking in one paragraph."}
],
)
print(resp.choices[0].message.content)Anthropic's official SDK also works — point base_url at https://byesu.com and pass your token as the API key.
Extended Thinking and Effort Control
Opus 4.8 can think before it answers, and Effort Control lets you dial how deeply. Two practical consequences:
- Cost tracks effort. Thinking depth affects token usage, and those tokens bill at the output rate (5x multiplier) — so higher effort settings on long agent runs add up. Reserve maximum effort for the requests that need it (hard debugging, architectural trade-offs) and run routine calls at lower effort.
- Parameters live in Anthropic's docs. The exact request fields for enabling extended thinking and setting effort follow Anthropic's Messages API spec — byesu passes them through unchanged on the
/v1/messagesendpoint. See Anthropic's extended-thinking documentation for the current parameter shape.
Key Parameters
| Parameter | API | Required | Description |
|---|---|---|---|
model | Both | ✅ | Always claude-opus-4-8; spell it exactly as in the console or you'll get a "model not found" error |
messages | Both | ✅ | Array of conversation messages, each with role and content |
max_tokens | /v1/messages | ✅ | Maximum output tokens per reply (required by Anthropic's native format) |
system | /v1/messages | System prompt (Anthropic native); in OpenAI format, use a role: system message instead | |
temperature | Both | Sampling temperature — lower is more deterministic | |
stream | Both | Set to true for streaming (SSE) responses |
Output tokens (including thinking) bill at 5x, so
max_tokens, reply length, and effort setting drive most of the spend; cache hits bill at only 0.1x.
Why Use byesu for Claude Opus 4.8
- Official model, no quality degradation — requests reach the real Opus 4.8, including extended thinking and Effort Control behavior.
- Transparent usage-based billing — public multipliers with the same 1 : 5 : 0.1 structure as official; the console shows your live billed price next to the official list price.
- Cache savings — cache hits bill at 0.1x, which matters most on exactly the long-context agent workloads Opus 4.8 is built for.
- Both API formats — Anthropic-native
/v1/messagesand OpenAI-compatible/v1/chat/completions; migrate with a base URL swap. - One key, many models — the same token calls GPT-5.6, Grok 4.5, and Gemini, so head-to-head evals are a model-string change.
- Pay-as-you-go, no subscription — top up with USDT, Alipay or WeChat Pay and pay only for tokens you use.
Related Links
- Quick Start (3 steps) — create a token · set the address · pick a model
- Claude Code CLI Setup — environment variables and one-click script
- Choosing a Group — why you need the Claude group
- Console Sign-up / Create Token — get an
sk-token and see live pricing - Full Documentation — 6 languages, covering text / image / video access
FAQ
How do I get Claude Opus 4.8 API access?
Sign up at the byesu console, create a token in the Claude group, and call claude-opus-4-8 through the Anthropic-native /v1/messages endpoint or the OpenAI-compatible /v1/chat/completions endpoint. No Anthropic account is required — one key also covers GPT-5.6, Grok, Gemini and more, billed pay-as-you-go with no subscription.
How much does the Claude Opus 4.8 API cost?
The official Anthropic list price for Opus 4.8 is $5 per million input tokens and $25 per million output tokens (see the official Anthropic pricing page for current numbers). On byesu, billing is per token with the same 1 : 5 : 0.1 input / output / cache-hit pricing structure as official (multipliers: input 1x, output 5x, cache hit 0.1x). You pay a fraction of the official list price — the console shows your live billed price next to the official list price.
Can I use Claude Opus 4.8 in Claude Code with byesu?
Yes. Set ANTHROPIC_BASE_URL to https://byesu.com (without /v1), ANTHROPIC_API_KEY to your sk- token, and optionally ANTHROPIC_MODEL to claude-opus-4-8, then restart your terminal. Claude Code then runs on Opus 4.8 through byesu with no other changes.
Does Claude Opus 4.8 support extended thinking and Effort Control?
Yes. Opus 4.8 supports extended thinking with Effort Control — an adjustable thinking depth that trades reasoning effort against token usage. Deeper effort settings consume more tokens (billed as output), so tune effort per task rather than leaving it at maximum.
Can I call Claude Opus 4.8 with the OpenAI SDK?
Yes. byesu offers an OpenAI-compatible API — set the base_url to https://byesu.com/v1, use your sk- token as the api_key, and set model to claude-opus-4-8. Existing OpenAI SDK code needs almost no changes. The Anthropic-native /v1/messages endpoint is also available.
What does a "no available channel" error mean when calling claude-opus-4-8?
It usually means the token was created in the wrong group. claude-opus-4-8 requires a token in the Claude group — create one under that group in the byesu console, and confirm the model name is spelled exactly claude-opus-4-8 as shown in the console model list.
