grokapikey.com

Uncensored AI API for Grok users

https://api.grokapikey.com/v1uncensored

Grok API: First request in five minutes

Get your first response in five minutes by pointing any OpenAI-compatible client to our base URL and authenticating with your API key.

Base URL and Authentication

Our API follows the OpenAI Chat Completions standard. To interact with the service, you must direct your client to https://api.grokapikey.com/v1 and include your unique API key in the Authorization header. You can generate this key immediately after signing up with just an email and password. The key is displayed once upon creation, so save it securely. If you lose it, you can regenerate a new key from your dashboard, which instantly revokes the previous one. There is no need to link a credit card for the trial account.

Your First Request

Start by sending a simple text prompt to verify connectivity. Use the standard chat/completions endpoint with the model identifier uncensored. The following example demonstrates a basic curl command to test the connection. This confirms that your authentication is correct and the service is responding. You can then adapt this structure for your specific application logic.

Replace YOUR_API_KEY with your actual key before running this command.

curl https://api.grokapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Python SDK Integration

If you are building a Python application, use the official openai library. Configure the client to use our base URL and your API key. This allows you to leverage familiar Python idioms while accessing the uncensored model. The client handles serialization and streaming automatically. Ensure your environment has the latest version of the library installed for best compatibility with our endpoints.

from openai import OpenAI

client = OpenAI(base_url="https://api.grokapikey.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 SDK Integration

For JavaScript or TypeScript projects, the Node.js OpenAI SDK works out of the box. Set the apiKey and baseURL properties in your configuration object. This ensures that all subsequent requests route through our infrastructure. You can use standard async/await patterns to handle responses. This approach is ideal for server-side applications or edge functions that require direct API access without proxying through OpenAI.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.grokapikey.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 Responses

For applications that benefit from real-time token generation, enable streaming by setting stream: true in your request body. The API returns a Server-Sent Events (SSE) stream of partial responses. This reduces perceived latency for users and allows for immediate display of generated text. Each chunk contains a delta of the response. Handle these events in your client code to update the UI progressively. Streaming consumes tokens normally and does not affect pricing.

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)

Limits, Errors, and Context

Each API key is limited to 300 requests per minute and a maximum request body size of 8 MB. If you exceed the rate limit, the API returns a 429 status code; wait a few seconds and retry. A 401 error indicates an invalid or revoked key, while a 402 error means your prepaid credit is exhausted. The model supports a 100,000-token context window for both input and output combined. Ensure your prompts fit within this limit to avoid truncation. Content filters remain minimal, except for a hard block on sexual content involving minors.

Under the hood: specs

Everything the endpoint can and cannot do, in one place — check it before you top up.

SpecValue
ProtocolOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
API keyBearer token in the Authorization header
MethodsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.grokapikey.com/v1
Modeluncensored
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens, input and output combined
Completion length16,000 tokens max; 2,048 if max_tokens is not set
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
JSON moderesponse_format: {"type": "json_object"}
SSE streamingYes — server-sent events; the last chunk carries token usage
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300 requests per minute per key
Request size8 MB request body
Concurrencyup to 8 in parallel per key
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $10 to $500
Bonus credit+5% on $50+, +10% on $100+
How you payprepaid credit, charged by real token usage; errors and refusals are free
Free trial$0.50 of credit valid 7 days, no card needed
Price$0.25 per 1M input tokens · $1.00 per 1M output tokens
Subscriptionpaid credit never expires, no subscription
Accountsign in with Google or with e-mail + password
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone key per account, regenerate any time (the old one stops working)

HTTP errors

Every error is JSON with a type you can switch on. You are never charged for an error.

StatusTypeReason
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditout of credit; add credit and retry
403content_blockedrefused by the content policy
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

How do I handle authentication errors?

A 401 error means your API key is invalid or has been revoked. Check that you are using the correct key from your dashboard. If you regenerated your key, ensure the old one is no longer in use.

What happens if I run out of credits?

You will receive a 402 error on subsequent requests. Add more prepaid credit via crypto (USDT or USDC) to resume service. Credits never expire, so you can top up at any time.

Is the uncensored model suitable for code generation?

Yes, the model handles code generation well without refusing standard technical topics. It does not block lawful adult or controversial content, making it suitable for diverse use cases.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.