API Documentation
This is a direct, uncensored LLM API that works with your existing OpenAI SDK clients. You get raw, unfiltered text generation with transparent crypto billing and no corporate gatekeeping.
Authentication and Base URL
Start by generating your key via the dashboard. Use the base URL https://api.grokapipricing.com/v1 for all requests. Set the Authorization header to Bearer YOUR_API_KEY. This single key works across all endpoints. Rotate it freely if needed.
POST /v1/chat/completions
Send your prompts to the chat endpoint. The model ID is always uncensored. Configure parameters like temperature or top_p to control creativity. Responses return standard chat completions with token usage metadata. Errors like 402 or 429 indicate billing or rate issues.
GET /v1/models
Check available models by sending a GET request to the models endpoint. You will see the uncensored model listed. This confirms connectivity and model availability. Use this for debugging client configurations before sending heavy payloads.
Streaming and SSE usage
Enable streaming by setting stream: true in your request body. The API returns Server-Sent Events (SSE) for real-time token delivery. Token usage statistics appear in the final chunk of the stream. This reduces perceived latency for long responses.
Function Calling and JSON Mode
Use response_format with {"type": "json_object"} for strict JSON outputs. Enable function calling by defining tools in your request. The model supports tool_choice for forced or automatic execution. This ensures reliable integration with your backend logic.
Rate Limits and Constraints
You are limited to 300 requests per minute per key. Concurrency is capped at 8 simultaneous requests. The maximum request body size is 8 MB. The context window allows 100,000 tokens total. Requests exceeding these limits receive 429 or 400 errors immediately.
cURL
curl https://api.grokapipricing.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Run query and return rows"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.grokapipricing.com/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.grokapipricing.com/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);Streaming
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)Common questions
Is the grok API uncensored for NSFW content?
Yes, the model does not refuse lawful adult or controversial topics. It only blocks sexual content involving minors. This makes it ideal for NSFW content creators needing raw output without filter friction.
How does the grok API pricing work compared to other providers?
We charge $0.15 per 1M input tokens and $0.50 per 1M output tokens. There are no monthly fees or subscriptions. You pay only for what you use, and prepaid credit never expires.
Can I use the standard OpenAI SDK with this endpoint?
Absolutely. Change the base URL and API key in your client. The endpoint is fully OpenAI-compatible for chat completions. You can use any standard SDK to integrate quickly.
Get your key in seconds
Sign up, copy the API key, and update your base URL. That is the entire configuration.
Try with trial credit