1. Choose the right model group

Sign in to the console and open API keys. Create a key in an enabled group that lists grok-4.5, such as 渠道2 / Grok Cursor (channel2-grok-cursor). The group attached to the key controls routing and price.

  • Check the model detail page for current access and rates.
  • A key in the default group does not automatically route to the dedicated 渠道1 or 渠道2 groups.
  • Keep the key on your server or in your local environment, rather than in a public browser bundle.

2. Send a small request

Use a terminal with curl installed. Replace YOUR_API_KEY with your own site API key, then run the request below. It asks for a short response and returns JSON.

Terminal · cURL
export OHGROK_API_KEY='YOUR_API_KEY'

curl --fail-with-body --silent --show-error \
  'https://api.ohgrok.com/v1/chat/completions' \
  -H "Authorization: Bearer $OHGROK_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "grok-4.5",
    "messages": [
      {"role": "user", "content": "Give me three short names for a creative coding project."}
    ],
    "stream": false
  }'

3. Read the result

On a successful chat-completions response, read the answer from choices[0].message.content. Inspect the returned usage when present, and use the console records to review the request.

If you use an OpenAI-compatible SDK, set its base URL to https://api.ohgrok.com/v1 and pass the same key and exact model ID. Use the actual method supported by your SDK; no special ohgrok SDK is required.

A model being listed does not guarantee available upstream capacity. Limits, available groups, and account balance still apply to each request.

4. If the request returns an error

Keep the HTTP status and returned error message together when diagnosing a request.

  • Authentication error: check the site API key and Authorization header.
  • Model or group error: check the exact model ID and the group selected when creating the key.
  • Quota or rate-limit error: check account access and the upstream limit reported in the response.
  • Upstream error: retain the request details and retry deliberately; avoid an unbounded automatic retry loop.

Keep your next step small.

Review the result and current usage before scaling your workflow.

Explore models