API Documentation for Cursor Developers
This quickstart guide shows Cursor IDE users how to configure our OpenAI-compatible API for uncensored text generation. Replace your standard endpoint to bypass restrictions while keeping the same client code you already know.
Authentication and Base URL
Our API uses standard Bearer token authentication. Set your base URL to HTTPS://api.cursoraiapikey.com/v1 and pass your key in the Authorization header. This endpoint works with any OpenAI-compatible SDK. You get a key immediately after signing up with Google or email. No phone number is required. Credit never expires. Errors are free. Refusals are free. Pay only for real tokens. Authorization: Bearer YOUR_API_KEY is all you need. Start making requests right away. The system is simple. Transparency matters.
First Request
Send a POST request to /v1/chat/completions to generate text. Use model "uncensored" for unrestricted responses. Include your system prompt to guide behavior. The API accepts standard OpenAI JSON structures. Here is a basic example using curl. Replace YOUR_API_KEY with your credential. Send your message and receive text output. This is the core interaction. Keep it simple.
curl https://api.cursoraiapikey.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List three key features of the new API update"}]
}'
Python SDK Integration
Use the official OpenAI Python package. Set the base URL and API key. Pass messages as a list of dictionaries. Request the "uncensored" model. The SDK handles retries automatically. Streaming is supported. Function calling works too. Configure temperature and top_p for control. This approach minimizes code changes. Your existing logic stays intact. Just point to our URL. Efficiency is key. Developers prefer familiar tools.
from openai import OpenAI
client = OpenAI(base_url="https://api.cursoraiapikey.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 SDK Usage
Initialize the OpenAI client in Node.js. Override the basePath to our URL. Set apiKey to your credential. Call chat.completions.create(). Pass the model as "uncensored". Await the result. Handle errors gracefully. The Node ecosystem is robust. You get real-time responses. Code is clean. Dependencies are standard. No extra libraries needed. Just configure the client. Run your script. Get your text. Simplicity wins.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.cursoraiapikey.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 and Tool Support
Enable streaming by setting stream to true. Receive tokens via Server-Sent Events. Use function calling for tool integration. Define tools in your request. The model returns arguments. Parse them safely. Support for JSON mode exists. Set response_format to json_object. This ensures valid output. Combine streaming with tools for dynamic apps. Real-time updates improve UX. Developers love low latency. Control the flow. Adapt to needs. Flexibility is essential.
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
Context window is 100,000 tokens. Max output is 16,000 tokens. Requests per minute limit is 300. Concurrent requests per key is 8. Max body size is 8 MB. Error 401 means invalid key. Error 402 means no credit. Error 429 means rate limit. Credit is prepaid. Errors are free. Refusals are free. No monthly fees. Use crypto to top up. USDT or USDC. Start with $20. Get bonuses. Keep coding.
Frequently asked questions
How do I get started with the cursor AI API key?
Sign up with Google or email on the Get API key page. Your key appears immediately. No phone number is needed. Add $20 in crypto to start using the uncensored LLM. Trial credit of $0.50 is available for new accounts. It lasts 7 days.
What is the context window and output limit?
The context window is 100,000 tokens for both prompt and completion. You can generate up to 16,000 tokens per request. If you do not set max_tokens, the limit is 2,048 tokens. This allows for long conversations and document processing. Adjust parameters to fit your use case. Stream large responses for better UX.
Why am I getting a 402 error?
A 402 error indicates your prepaid credit is exhausted. The API does not charge for errors or refusals. You only pay for real tokens used. Top up using USDT (TRC20) or USDC (Base). Minimum top-up is $20. Bonuses apply at higher tiers. Add funds to resume service immediately.
Get your API key
Sign up, copy the credential, and update your base URL. That is all you need to do.