Skip to content

Grok 4.7 / Grok 4.6 API — Access via an AI API Gateway ​

Call xAI’s Grok 4.7 and Grok 4.6 through byesu — an AI API gateway with pay-as-you-go billing and no subscription. Both the OpenAI-compatible and the Anthropic-native API work, so you can also run Grok in Claude Code with environment variables.

Model specs below are quoted from xAI’s official documentation, checked on 2026-10-22.

What It Is ​

According to xAI’s documentation (docs.x.ai, now published under the SpaceXSI name), Grok 4.7 and Grok 4.6 share the same positioning: a frontier model for coding, agentic tasks and knowledge work. Context, capabilities and list price are identical; grok-4.7 is the newer version (grok-4.6 official page). For the previous generation see Grok 4.5.

ItemValue
Model ID on byesugrok-4.7 · grok-4.6
Context window500,000 tokens
Input → outputText and images → text
Reasoning effortlow / medium / high / xhigh, default high
Function calling / structured outputsSupported

Models available on byesu ​

Model IDNotes
grok-4.7Newer version; 500K context, list price $2 / $6 ($0.50 cached input)
grok-4.6Previous version; 500K context, same list price

How Pricing Works ​

byesu bills per token with no monthly fee. The actual price of every model is shown live in the model list after you sign in, and the console records the charge for each request.

For reference, xAI’s official list price (same for both): for prompts under 200K tokens, $2 input, $0.50 cached input and $6 output per million tokens; for prompts of 200K tokens or more, the whole request is billed at $4 / $1 / $12.

TIP

grok-4.7 and grok-4.6 are served by the Grok group. Grok is in the default auto-group list, so a token in the default auto group can call them; you can also create a token in the Grok group to pin the route. A wrong group returns “no available channel”; see Choosing a Group.

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

Authenticate with Authorization: Bearer sk-YOUR_TOKEN.

Option 1: Anthropic native /v1/messages ​

bash
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": "grok-4.7",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Explain what an API gateway is in one sentence"
      }
    ]
  }'

Option 2: OpenAI-compatible /v1/chat/completions ​

python
from openai import OpenAI

client = OpenAI(api_key="sk-YOUR_TOKEN", base_url="https://byesu.com/v1")

resp = client.chat.completions.create(
    model="grok-4.7",
    messages=[{"role": "user", "content": "Explain what an API gateway is in one sentence"}],
)
print(resp.choices[0].message.content)

To use grok-4.6, change only the model field.

Use It in Claude Code ​

Point Claude Code at byesu with environment variables (the base URL has no /v1):

bash
export ANTHROPIC_BASE_URL="https://byesu.com"
export ANTHROPIC_API_KEY="sk-YOUR_TOKEN"
export ANTHROPIC_MODEL="grok-4.7"

Full steps and a one-line setup script: Claude Code CLI.

FAQ ​

What is the difference between grok-4.7 and grok-4.6? ​

According to xAI’s documentation, both have the same positioning, 500K context, capabilities and list price. grok-4.7 is the newer version. For new projects, use grok-4.7.

How much does the Grok 4.7 API cost on byesu? ​

byesu bills per token with no subscription; the live price is shown in the model list after you sign in. For reference, xAI’s official list price (prompts under 200K tokens) is $2 input, $0.50 cached input and $6 output per million tokens.

How long is the Grok 4.7 context window? ​

According to xAI’s documentation, both grok-4.7 and grok-4.6 have a 500K-token context window; requests with prompts of 200K tokens or more are billed at the higher tier.

Can I use grok-4.7 in Claude Code? ​

Yes. Set ANTHROPIC_BASE_URL to https://byesu.com (no /v1), ANTHROPIC_API_KEY to your token and ANTHROPIC_MODEL to grok-4.7, then reopen the terminal.

What does “no available channel” mean when calling grok-4.7? ​

Check that the token uses the default auto group or the Grok group, and that the model ID is exactly grok-4.7 (with a dot, not grok-4-7), as shown in the console.

Got a problem? Contact support or join our group.