Get started
xAI
xAI

Grok Code Fast 1

Grok Code Fast 1 is a reasoning model by xAI with function calling — designed for complex, multi-step problem solving where accuracy matters more than speed. It supports a 256K token context window with up to 256K tokens of output. Priced at $0.2 per million input tokens and $1.5 per million output tokens, it is one of the most cost-efficient options in its class. Access Grok Code Fast 1 through Inworld Router with OpenAI SDK compatibility, built-in failover, and intelligent routing across providers.
Function CallingReasoningreasoningCapability

Step 1 — Create Router

curl --location 'https://api.inworld.ai/router/v1/routers' \ --header 'Authorization: Basic <your-api-key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "compare-frontier-models", "defaultRoute": { "route_id": "default", "variants": [ { "variant": { "variant_id": "xai/grok-code-fast-1-a", "model_id": "xai/grok-code-fast-1" }, "weight": 33 }, { "variant": { "variant_id": "xai/grok-3-b", "model_id": "xai/grok-3" }, "weight": 33 }, { "variant": { "variant_id": "xai/grok-3-beta-c", "model_id": "xai/grok-3-beta" }, "weight": 34 } ] } }'

Step 2 — Chat Completion

curl --location 'https://api.inworld.ai/v1/chat/completions' \ --header 'Authorization: Basic <your-api-key>' \ --header 'Content-Type: application/json' \ --data '{ "model": "inworld/compare-frontier-models", "messages": [{"role": "user", "content": "Hello!"}] }'

Grok Code Fast 1 pricing and providers

Access Grok Code Fast 1 through xAI via Inworld Router or Realtime API. By using the AI provider(s) below you acknowledge you reviewed and agree to their terms listed in the Legal section under the AI provider's name.
CapabilitiesInput modalitiesOutput modalities
xAIxAI256K256K$0.20$1.50

Other xAI models available through Inworld

Compare Grok Code Fast 1 with other xAI models available through Inworld Router or Realtime API.
CapabilitiesInput modalitiesOutput modalitiesInference provider
xAIGrok 3131.1K131.1K$3.00$15.00
xAIGrok 3 Beta131.1K131.1K$3.00$15.00
xAIGrok 3 Fast$3.00$15.00
xAIGrok 3 Fast Beta131.1K131.1K$3.00$15.00
xAIGrok 3 Fast Latest131.1K131.1K$3.00$15.00
xAIGrok 3 Latest131.1K131.1K$3.00$15.00
xAIGrok 3 Mini Fast131.1K131.1K$0.30$0.50+1
xAIGrok 3 Mini Fast Beta131.1K131.1K$0.30$0.50+1
xAIGrok 3 Mini Fast Latest131.1K131.1K$0.30$0.50+1
xAIGrok 3 Mini Latest131.1K131.1K$0.30$0.50+1
xAIGrok 4256K256K$3.00$15.00
xAIGrok 4 0709256K256K$3.00$15.00
xAIGrok 4 Fast$0.20$0.50
xAIGrok 4 Fast Non Reasoning2M2M$0.20$0.50
xAIGrok 4 Fast Non Reasoning Latest$0.20$0.50
xAIGrok 4 Fast Reasoning2M2M$0.20$0.50
xAIGrok 4 Fast Reasoning Latest$0.20$0.50
xAIGrok 4 Latest256K256K$3.00$15.00
xAIGrok 4.1 Fast2M2M$0.20$0.50+3
xAIGrok 4.1 Fast Non Reasoning2M2M$0.20$0.50+1
xAIGrok 4.1 Fast Non Reasoning Latest2M2M$0.20$0.50+1
xAIGrok 4.1 Fast Reasoning2M2M$0.20$0.50+3
xAIGrok 4.1 Fast Reasoning Latest2M2M$0.20$0.50+3
xAIGrok 4.20$2.00$6.00
xAIGrok 4.20 0309$2.00$6.00
xAIGrok 4.20 0309 Non Reasoning$2.00$6.00
xAIGrok 4.20 0309 Reasoning2M2M$2.00$6.00+2
xAIGrok 4.20 Beta$2.00$6.00
xAIGrok 4.20 Beta 0309$2.00$6.00
xAIGrok 4.20 Beta 0309 Non Reasoning2M2M$2.00$6.00
xAIGrok 4.20 Beta 0309 Reasoning2M2M$2.00$6.00+2
xAIGrok 4.20 Beta Latest$2.00$6.00
xAIGrok 4.20 Beta Latest Non Reasoning$2.00$6.00
xAIGrok 4.20 Beta Latest Reasoning$2.00$6.00
xAIGrok 4.20 Beta Non Reasoning$2.00$6.00
xAIGrok 4.20 Beta Reasoning$2.00$6.00
xAIGrok 4.20 Experimental Beta 0304$2.00$6.00
xAIGrok 4.20 Experimental Beta 0304 Non Reasoning$2.00$6.00
xAIGrok 4.20 Experimental Beta 0304 Reasoning$2.00$6.00
xAIGrok 4.20 Experimental Beta Latest$2.00$6.00
xAIGrok 4.20 Experimental Beta Non Reasoning Latest$2.00$6.00
xAIGrok 4.20 Experimental Beta Reasoning Latest$2.00$6.00
xAIGrok 4.20 Non Reasoning$2.00$6.00
xAIGrok 4.20 Non Reasoning Gv2$2.00$6.00
xAIGrok 4.20 Non Reasoning Latest$2.00$6.00
xAIGrok 4.20 Reasoning$2.00$6.00
xAIGrok 4.20 Reasoning Gv2$2.00$6.00
xAIGrok 4.20 Reasoning Latest$2.00$6.00
xAIGrok Code Fast256K256K$0.20$1.50
xAIGrok Code Fast 1 0825256K256K$0.20$1.50

Start building with Grok Code Fast 1

Access Grok Code Fast 1 and every other model through Inworld Router or Realtime API. Create your free account and start routing in minutes.
Copyright © 2021-2026 Inworld AI
Grok Code Fast 1 by xAI — Pricing, Specs & API Access | Inworld