Text Generation

xAI logoxAI

Grok 4.7 API

Grok 4.7 for text conversations and coding through an OpenAI-compatible API. Priced at the same credit rates as Grok 4.6.

24H Status Monitor
24h success rate: 100%
Grok 4.7 — Scene illustration, not an output of this model

Scene illustration, not an output of this model

Model:

grok-4.7
Price: 1.2 credits per 1K input tokens · ≈ $0.0006-$0.0012 · 2.4 credits per 1K output tokens · ≈ $0.0012-$0.0024High stability with detailed usage records on the APIAny platform.
PlaygroundHistoryPricingAPI

Prompt preset — no generated result yet

grok-4.7
469 (suggested: 2,000)
0.7
02
1024
168192
->

USD estimate $0.0015-$0.003: highest recharge package uses $1 = 2,000 credits; entry package uses $1 = 1,000 credits.

Preview
No Task Running
Grok 4.7
LLMResult preview

History

Saved locally in this browser

0 running · 0 completed

Your generation history will appear here

Input

1.2 credits/1K

≈ $0.0006-$0.0012

Output

2.4 credits/1K

≈ $0.0012-$0.0024

Cache

1.2 credits/1K

≈ $0.0006-$0.0012

Context

-

Max output

-
View API usage
Pricing
Model ID
Type
Quality
Price
grok-4.7
Text Generation
Input tokens
1.2 credits per 1K input tokens · ≈ $0.0006-$0.0012
grok-4.7
Text Generation
Cache read tokens
1.2 credits per 1K cached input tokens · ≈ $0.0006-$0.0012
grok-4.7
Text Generation
Output tokens
2.4 credits per 1K output tokens · ≈ $0.0012-$0.0024
grok-4.7
Text Generation
Minimum request
0.8 credits minimum · ≈ $0.0004-$0.0008
Model IDgrok-4.7
TypeText Generation
QualityInput tokens
Price1.2 credits per 1K input tokens · ≈ $0.0006-$0.0012
Model IDgrok-4.7
TypeText Generation
QualityCache read tokens
Price1.2 credits per 1K cached input tokens · ≈ $0.0006-$0.0012
Model IDgrok-4.7
TypeText Generation
QualityOutput tokens
Price2.4 credits per 1K output tokens · ≈ $0.0012-$0.0024
Model IDgrok-4.7
TypeText Generation
QualityMinimum request
Price0.8 credits minimum · ≈ $0.0004-$0.0008

API Reference

Call this model through a standard REST API. Authenticate with your API key, then pick an endpoint below to see its parameters and examples.

Authentication

Every request needs a Bearer token in the Authorization header. Create an API key in the console.

Authorization: Bearer YOUR_API_KEY
POSThttps://apiany.ai/v1/chat/completions

Request parameters

ParameterTypeRequiredNotes
modelstringRequiredModel identifier to invoke. Use this model's ID.
messagesarrayRequiredConversation history in OpenAI chat format (role + content).
streambooleanOptionalWhen true, the response streams back as server-sent events.

Request example

curl "https://apiany.ai/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-4.7",
  "messages": [
    {
      "role": "user",
      "content": "Write a short decision memo using these fictional constraints: a two-person studio needs shared file review in 10 days; first-year budget 600 USD. Option A costs 20 USD/month and is ready now but lacks custom branding. Option B takes 15 engineering days plus 100 USD/year hosting and supports branding. Branding is desirable, not required; neither option has verified backup recovery. Recommend an option, show budget arithmetic and state the verification still needed."
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1024
}'

Response example

{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "grok-4.7",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 18,
    "total_tokens": 30
  }
}

More models

Explore all models

DeepSeek V4.1 Flash

DeepSeek logoText Generation

DeepSeek V4 Flash

DeepSeek logoText Generation

GLM 5.3 Flash

GLM logoText Generation

Gemini 3.5 Flash

Google logoText Generation

New users get free credits - no credit card required Get started
APIAny logoAPIAny
AI Models
PricingFree API
Resources
Sign InGet Started

APIAny API gateway for every production AI model.

Popular Models

Collections

Model Types

Platform

  • Docs
  • Contact

Legal

APIAny logoAPIAny© 2026 APIAny. All rights reserved.
support@apiany.ai
Seedance 2.0
GPT Image 2
Nano Banana 2
Z-Image
Gemini Omni
All Collections
GPT API Family
Seedance API Family
Gemini API Family
GPT Image API
Text Generation
Image Generation
Video Generation
Audio Generation
Models
Pricing
About
Privacy Policy
Terms of Service
Refund Policy
English
Français
Deutsch
中文
日本語
한국어
Español