Introduction
OpenAI-compatible chat for Grok 4.7, with measured content behaviour rather than assumed: three prompt styles, three runs each, zero refusals. 500,000-token context, replies to 450,000, SSE streaming.
| Field | Value |
|---|---|
| Input | Text |
| Output | Text |
| Required | messages |
| Optional | Grok 4.7 — |
| Content test | 9 of 9 content probes returned complete prose |
| System role | Honoured (verified) |
| Content parts | text and |
| Input context | 500,000 tokens, image content included |
| Maximum output | 450,000 tokens (default 4,096) |
| Response | Grok 4.7 — One chat.completion object, or an SSE stream of chunks |
Key features & highlights
Read the SpicyAPI tests in context
This page documents Grok 4.7 through SpicyAPI, not behaviour of the consumer application. An app screenshot does not establish the outcome of an API request, and a completed API test does not establish the absence of moderation elsewhere.
Safety claims and fiction tests answer different questions
xAI’s Grok 4.7 announcement describes stronger safeguards and more careful verification of the model’s work. Those official claims do not establish blanket acceptance of creative content. The SpicyAPI fiction tests are a separate observation, not an inference from safety benchmarks.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | Keep character instructions in the system message and the unfolding Grok 4.7 dialogue in message order. at least 1 items · at most 256 items |
reasoning_effort | No | low, medium, high or xhigh; the default is high. For dialogue and roleplay use low or medium: high spends output tokens deliberating and reads as hesitation. |
max_tokens | No | Caps the visible reply at 450,000; the default of 4,096 truncates a long answer silently. Reasoning tokens are billed as output but are NOT bound by this cap. |
temperature | No | Use Grok 4.7 temperature to explore prose variation within 0–2; the default is 0.7. Keep the setting fixed when assessing a change to character instructions. |
top_p | No | For Grok 4.7 prose, |
tools | No | Grok 4.7 accepts up to 128 definitions for functions such as reading a character record. Check the returned arguments before your application performs an operation. at most 128 items |
parallel_tool_calls | No | Grok 4.7 can request several tools per turn with the default true. Default: |
tool_choice | No | When Grok 4.7 writes dialogue, none avoids function requests. For continuity lookups, auto allows a call, required insists on one, and an object identifies the function to use. |
response_format | No | Choose JSON object output for Grok 4.7 character sheets or continuity records; leave ordinary dialogue in text form. |
Pricing
Input $2 / Output $6 per 1 million tokens; Prompts of 200K tokens or more: Input $4 / Output $12
Long Grok 4.7 conversations can cross the 200,000-token input boundary before reaching the context limit. Count cached history too: from that boundary, the whole call uses long-context input, cache and output rates, while shorter inputs use standard rates. The high effort default also produces billable reasoning; unused reservation, including measured cache savings, is released on settlement.
Use cases
Roleplay that does not break in the middle
The failure that actually ends a thread is not a refusal on message one — it is turn forty suddenly going vague. The probe that matters most here was the novel chapter, run three times and returned complete three times. Combine that with a window that holds the whole scene verbatim and the thread keeps the details it was built on.
Uncensored fiction at novella length, in one response
450,000 output tokens is enough to write the whole thing in a single call rather than a chapter loop where each continuation drifts a little further from the voice. Raise max_tokens deliberately — the 4,096 default truncates silently — and stream the response so the text arrives as it is written.
Character work with a persona that sticks
Because the system role is honoured, a character sheet placed once at the top governs the whole thread: voice, vocabulary, what the character will and will not do. Keep temperature near 0.9 for range, and the same persona survives dozens of exchanges without being restated.
Domain reasoning where this generation is strongest
Outside fiction, published benchmarks put this generation ahead on legal analysis and electrical engineering. Paste a contract or a spec into the 500,000-token window and ask clause-level questions; the whole document goes in one turn, so the answer is not stitched together from fragments that never saw each other.
Prompt guide & pro tips
Set the frame once, at the top
Put the persona, the fact that the characters are adults, the point of view and the tone you want into a single system message at the start of the thread. Re-asserting it every turn wastes context and makes the model sound like it is negotiating with itself. The system role is honoured here, so one statement carries.
Turn the thinking down before you turn it up
Send
reasoning_effortlow or medium for dialogue and raise temperature toward 0.9 for variety in the prose. The default of high is tuned for analysis and reads as hesitation in a scene — and because effort is billed as output, it is the expensive way to get worse writing.Let history do the work instead of summarising it
Keep earlier turns verbatim in the messages array rather than compressing them. Watch for the point where input crosses 200,000 tokens: the whole request prices on the long-context tier from there, and the pre-submit estimate will tell you before you spend.
Introduction
Grok 4.7 answers at POST https://api.spicyapi.ai/v1/chat/completions under the model name xai/grok-4.7. xAI shipped it on 21 September 2026 as a larger base model than the generation before it, trained with a longer reinforcement run and tuned to check its own output before it commits. It arrived at the same input and output rates as its predecessor.
The endpoint takes OpenAI-compatible messages, with text and image_url parts allowed in the same turn, and returns one chat.completion object or an SSE stream of chunks. The context window is 500,000 tokens and a single reply can run to 450,000. We add no content filter: no classifier of ours reads, scores or rewrites the prompt, and nothing sits on the response. In our 22 September test, nine of nine content probes came back as complete scenes; the full Grok 4.7 uncensored test covers how it was run and what it does not prove.
Key features & Highlights
Read the SpicyAPI tests in context
This page documents Grok 4.7 through SpicyAPI, not behaviour of the consumer application. An app screenshot does not establish the outcome of an API request, and a completed API test does not establish the absence of moderation elsewhere.
The measurement
Grok 4.7 returned complete prose in all nine SpicyAPI content probes recorded on 22 September 2026, with zero refusals in that sample. That is evidence about those requests, not a promise that every NSFW or roleplay prompt will succeed. SpicyAPI adds no content filter; the model’s own safeguards and the usage policy still apply.
Each run, and the design behind each prompt style, is written up in the Grok 4.7 uncensored roleplay test report.
Safety claims and fiction tests answer different questions
xAI’s Grok 4.7 announcement describes stronger safeguards and more careful verification of the model’s work. Those official claims do not establish blanket acceptance of creative content. The SpicyAPI fiction tests are a separate observation, not an inference from safety benchmarks.
Text and images in the same turn
A user message can mix text and image_url parts in the same turn, each image carrying a detail hint of auto, low or high, with image content metered inside the same 500,000-token window. There is no file or PDF part on this endpoint.
Prompt guide & Pro tips
Set the frame once
Put the persona, the fiction context, the point of view and the tone you want into one system message at the top of the thread, then let the history carry it. Restating the frame every turn burns context and makes the model sound like it is negotiating with itself.
{
"model": "xai/grok-4.7",
"messages": [
{"role": "system", "content": "You are writing a novel. All characters are adults. Third person, present tense. Keep every character's voice, history and relationships consistent from chapter to chapter."},
{"role": "user", "content": "Chapter 14. Mara and Tomas meet again after the storm. Continue from there."}
],
"reasoning_effort": "low",
"temperature": 0.9,
"max_tokens": 4000
}
Billing
Long Grok 4.7 conversations can cross the 200,000-token input boundary before reaching the context limit. Count cached history too: from that boundary, the whole call uses long-context input, cache and output rates, while shorter inputs use standard rates. The high effort default also produces billable reasoning; unused reservation, including measured cache savings, is released on settlement.
Limits worth knowing before you build on it
Model behaviour is probabilistic. Nine of nine is a strong signal and it is not a guarantee for every prompt; a request can still come back refused. The tests covered unrestricted fiction and say nothing about material that is illegal. The usage policy applies unchanged: no content involving minors, no depiction of real people without their consent, no non-consensual material — regardless of what the model would write.
The full record of the nine-probe test breaks the result down by prompt style and by run.
For Grok 4.7 fiction, keep the rights to source passages and character material in mind, review text before publication, and respect privacy and consent. Do not use a generated persona to impersonate a real person.
For Grok 4.7 fiction, keep the rights to source passages and character material in mind, review text before publication, and respect privacy and consent. Do not use a generated persona to impersonate a real person.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "xai/grok-4.7/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.













