grok-4-fast

by xAIText

grok-4-fast is available through TTAPI. Grok chat models for fast reasoning, coding, and tool-enabled application flows.

InputPromptmessages
Models6available
FlowSyncresult URL
Price50% offofficial
grok-4-fastExample conversation
You

Review a TypeScript webhook handler for reliability risks and propose the highest-value fixes. Keep the answer practical for a grok-4-fast integration.

grok-4-fast logo
grok-4-fast

Verify signatures against the raw body, reject stale events, deduplicate by event ID, acknowledge quickly, and move slow work to a retried background queue. This example is tailored to the grok-4-fast model page.

Examples

A request and response, in context

01 · Code reviewgrok-4-fast
You

Review a TypeScript webhook handler for reliability risks and propose the highest-value fixes. Keep the answer practical for a grok-4-fast integration.

grok-4-fast logo
grok-4-fast

Verify signatures against the raw body, reject stale events, deduplicate by event ID, acknowledge quickly, and move slow work to a retried background queue. This example is tailored to the grok-4-fast model page.

02 · Query designgrok-4-fast
You

Explain how to choose indexes for a job table filtered by owner, status, and creation time. Keep the answer practical for a grok-4-fast integration.

grok-4-fast logo
grok-4-fast

Begin from the most common filter order, use a composite index that supports the leading predicates, measure the actual query plan, and retain a simple retention strategy for old rows. This example is tailored to the grok-4-fast model page.

03 · Product briefgrok-4-fast
You

Summarize a product brief for a developer API in five concise bullets. Keep the answer practical for a grok-4-fast integration.

grok-4-fast logo
grok-4-fast

Cover the customer problem, primary workflow, integration surface, pricing or quota rule, and the measurable outcome that defines adoption. This example is tailored to the grok-4-fast model page.

Capabilities

What you can build with grok-4-fast

Prompt driven generation

Submit a concise prompt and get production-ready responses output through one TTAPI job.

Core controls only

Keep integration simple with prompt, model, output settings, and callback handling.

Async result flow

Use polling or webhook callbacks so long-running generations do not block your UI.

Ready for product UI

Return Grok results that can be displayed, stored, or passed into downstream workflows.

Pricing

Token billing rules

One key and one balance across supported text models.

Token billing ruleOfficial pricing
PlatformTTAPI billing
xAI Grok50% off official pricing
API request

Headers and submit parameters

Use the endpoint below with your TTAPI key and the request fields shown.

POSThttps://api.ttapi.io/v1/chat/completions

Headers

Authorizationstringrequired

Your TTAPI API key.

Content-Typestringrequired

Use application/json.

Body

modelstringrequired

Supported model identifier.

messagesarrayrequired

OpenAI-compatible chat messages.

temperaturenumberoptional

Sampling temperature.

max_tokensintegeroptional

Maximum output tokens.

streambooleanoptional

Enable server-sent event streaming.

Open the official TTAPI documentation
Integrate

From key to first result

Copy the resolved endpoint, authentication headers, and request body for this model.

curl --request POST \
  --url https://api.ttapi.io/v1/chat/completions \
  --header 'Authorization: Bearer $TTAPI_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"model":"grok-4-fast","messages":[{"role":"user","content":"Compare polling and webhooks for asynchronous AI jobs."}],"stream":false}'