tr ▾
Deneme anahtarı kazanın

Cursor API Dokümantasyonu ve Hızlı Başlangıç

Bu sansürsüz LLM, OpenAI uyumlu bir API üzerinde çalışır; kendi cursor API anahtarınızı eklemenize veya doğrudan entegrasyon için yeni bir tane oluşturmanıza olanak tanır.

Kimlik Doğrulama ve Base URL Kurulumu

İstemcinizi temel URL'ye yönlendirin https://api.cursorapi.cc/v1 ve anahtarınızı yetkilendirme başlığında geçirin. Sistem standart Bearer token kimlik doğrulamasını kullandığından, uç noktayı güncelledikten sonra herhangi bir OpenAI SDK'sı kutudan çıkar çıkmaz çalışır.

/v1/chat/completions adresine İstek Gönderme

İlk isteminizi gönderin POST /v1/chat/completions model kimliğinin ayarlandığı endpoint uncensored. Bu model, yasal yetişkin içerikler için reddi olmadan yanıt verir, size çıktı üzerinde tam kontrol sağlar. Yalnızca gerçek token kullanımı için ödeme yaparsınız, hatalar ücretsizdir, bu nedenle sessiz hatalarda kredi harcamazsınız.

cURL

curl https://api.cursorapi.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Summarize the key differences between the two models."}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.cursorapi.cc/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.cursorapi.cc/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);

Akış

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)

API anahtarınızı anında alın

Kaydolun, anahtarı kopyalayın, temel URL'nizi güncelleyin. Basit kurulum.

Deneme anahtarı kazanın