Grok 4.5 API pricing and access

Run Grok 4.5 (model ID grok-4.5) through Code By AI for ≈$0.016667 per 1M input tokens and $0.05 per 1M output tokens, with no monthly subscription.

What Grok 4.5 is for

Choose tasks supported by this model’s catalog channel and review its output before use.

Your price

≈$0.016667

per 1M tokens, USD

grok-4.5Top up & try
Your price
Input≈$0.016667
Cache read$0.0025
Output$0.05

What grok-4.5 costs in a typical month

On Code By AI, 20M input tokens and 2M output tokens cost $0.43.

How to use grok-4.5

Create an API key and run the OpenCode setup command on the API Keys page. In your OpenCode config, merge the entry below into provider.codebyai.models without removing existing models. Open a new terminal and run opencode -m codebyai/grok-4.5.

{
  "grok-4.5": {
    "name": "grok-4.5"
  }
}
Read the OpenCode setup guideCompare plans and monthly costs

No key yet? Create one

Claude Code, Codex and Gemini CLI compatibility

A client can call grok-4.5 only when it speaks the endpoint that serves this model. The table shows what works and the minimum configuration.

  • Claude CodeNot applicable

    Not applicable: the Anthropic Messages endpoint serves Claude models only.

    Open the Claude Code guide
  • CodexNot applicable

    Grok supports Chat Completions (/v1/chat/completions) but not Responses (/v1/responses), which Codex CLI requires.

    Open the Codex guide
  • Gemini CLINot applicable

    Not applicable: the Gemini generateContent endpoint serves the Gemini family only.

    Open the Gemini CLI guide

Compare other Grok models

Your price /1M

Grok 4.5 FAQ

Get started

Four steps to your first request

  1. 01

    Create a free account

    Sign up with Google, GitHub or email and set a password. No card is required.

  2. 02

    Generate an API key

    Create a key in one click from the dashboard. It lets your CLI authenticate with Code By AI.

  3. 03

    Top up your balance

    Add credit before your first request; usage is charged per token from your balance.

  4. 04

    Point your CLI at Code By AI

    Export one base-URL variable, or add a model provider block to config.toml. The setup guides list the exact lines for each agent.

Use it nowTop up to send a requestWhat a working month costs

No card required to sign up · API usage requires a top-up