Text model API

Grok 4.7 API

Grok 4.7 is xAI’s frontier model for coding, agentic tasks, and professional knowledge work. It uses a larger base model and a longer reinforcement-learning process than Grok 4.6, with additional emphasis on difficult tasks that require extended reasoning, self-verification, and longer-context management. The model supports text and image inputs, a 500K-token context window, reasoning effort from low to xhigh, function calling, and structured outputs. It is designed for sophisticated coding agents, research workflows, and multi-step professional tasks.

Model id
grok-47
Takes
Text (required)
Makes
Text
Endpoint
POST /api/v1/chat/completions
Made by
xAI
Mode
Synchronous

Call Grok 4.7

Base URL https://payload.rentprompts.com/api/v1. Replace the placeholder with your key.

Model grok-47

POST /api/v1/chat/completions

curl https://payload.rentprompts.com/api/v1/chat/completions \
  -H "Authorization: Bearer rp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-47",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about APIs."
    }
  ],
  "max_tokens": 256
}'

Replace rp_live_YOUR_KEY with your key, ideally via the RENTPROMPTS_API_KEY environment variable. Keys are shown only once, so they are never filled in here. Get your API key →

What a typical call costs

Worked out from Grok 4.7's published price (0.3 J in · 0.7 J out / 1K tokens). You pay only for successful results, from your Joule balance.
  • 1,000 input + 500 output tokens0.65 Joules
  • 10,000 input + 2,000 output tokens4.4 Joules

Send requests to POST /api/v1/chat/completions. Grok 4.7 answers synchronously: the result comes back in the response to the same request. Token counts come from the model's own usage report, so a real call may use more or fewer tokens than this example.

Settings

Optional parameters this model accepts (pass them in settings on /v1/run, or as top-level fields where OpenAI defines them).
NameTypeDefaultRange / options
temperaturefloat0.70 – 1
top_pfloat0.950 – 1
Grok 4.7 API — Pricing & Code Examples | RentPrompts