Authentication & Base URL Setup
Start by generating your API key on the dashboard. The base URL is HTTPS://api.grokkey.com/v1. Pass your key in the Authorization header. Refusals are free. Top-ups use crypto only.
Chat Completions Endpoint
Send text prompts to the chat endpoint. The model ID is "uncensored". It is not GPT or Grok. Context is 100k tokens. Output max is the full window. Errors do not charge credit.
Configure parameters like temperature and top_p. The API returns text only. No embeddings or images. Use the standard JSON format for requests and responses.
Streaming & Token Usage
Stream responses by setting stream: true. Receive SSE chunks. Token usage appears in the final chunk. This allows real-time display. It also handles large outputs efficiently. Use this for chat interfaces.
Function Calling & JSON Mode
Use tools for structured output. Set response_format to {"type": "json_object"} for strict JSON. Function calling supports tool_choice. This enables reliable integration. Use this for data extraction. It works with the uncensored model. Ensure your prompts are clear.
Rate Limits & Constraints
Limit is 300 requests per minute. Max concurrent requests is 8. Request body max is 8 MB. One key per account. Replace old keys with new ones. Limits prevent abuse. Monitor your usage. Credits never expire. Pay only for tokens used.
Model Specifications
Model ID: "uncensored". Open-weight model. Tuned for adult content. No training on your prompts. 100k context window. No separate output cap. Parameters: temperature, top_p, stop, seed, presence_penalty, frequency_penalty. No SLA. No certifications. Direct API access.
cURL
curl https://api.grokkey.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top five Rust crates for high throughput networking"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.grokkey.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.grokkey.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)