인증 및 Base URL 설정
대시보드에서 API 키를 생성하세요. 베이스 URL은 HTTPS://api.grokkey.com/v1입니다. Authorization 헤더에 키를 전달하세요. 거부 응답은 무료입니다. 충전은 암호화폐로만 가능합니다.
채팅 완료 엔드포인트
채팅 엔드포인트에 텍스트 프롬프트를 보내세요. 모델 ID는 "uncensored"입니다. GPT나 Grok이 아닙니다. 컨텍스트는 100k 토큰입니다. 최대 출력은 전체 창입니다. 오류는 크레딧을 청구하지 않습니다.
temperature나 top_p와 같은 매개변수를 구성하세요. API는 텍스트만 반환합니다. 임베딩이나 이미지는 제공되지 않습니다. 요청 및 응답에는 표준 JSON 형식을 사용하세요.
스트리밍 및 토큰 사용
stream 매개변수를 설정하여 스트림 응답을 사용하세요. stream: true. SSE 청크를 받습니다. 토큰 사용량은 마지막 청크에 나타납니다. 이렇게 하면 실시간 표시가 가능합니다. 또한 큰 출력을 효율적으로 처리합니다. 채팅 인터페이스에 사용하세요.
함수 호출 & JSON 모드
구조화된 출력을 위해 도구를 사용하세요. 설정 response_format 수신하여 {"type": "json_object"} 엄격한 JSON. 함수 호출은 tool_choice를 지원합니다. 이는 신뢰할 수 있는 통합을 가능하게 합니다. 데이터 추출에 사용하세요. 비검열 모델과 함께 작동합니다. 프롬프트를 명확하게 작성하세요.
속도 제한 및 제약 조건
분당 제한은 300회 요청입니다. 최대 동시 요청은 8입니다. 요청 본문 최대는 8MB입니다. 계정당 키 하나. 이전 키를 새 키로 교체하세요. 제한은 남용을 방지합니다. 사용량을 모니터링하세요. 크레딧은 만료되지 않습니다. 사용한 토큰에만 지불하세요.
모델 사양
모델 ID: "uncensored". 오픈 가중치 모델. 성인 콘텐츠에 맞춰 조정됨. 프롬프트 학습 없음. 100k 컨텍스트 창. 별도 출력 제한 없음. 매개변수: temperature, top_p, stop, seed, presence_penalty, frequency_penalty. SLA 없음. 인증 없음. 직접 API 접근.
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);스트리밍
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)