Sozdai LogoDocs

빠른 시작

몇 분 만에 연동 — OpenAI 완전 호환, base_url 하나만 변경하세요.

#개요

이 API는 OpenAI 완전 호환입니다. 아무 OpenAI SDK나 도구의 base_url을 아래 주소로 지정하고 헤더에 키를 보내면 사용 가능한 모든 모델을 호출할 수 있습니다.

Base URL: https://api.foxwire.ai/v1

#3-Step Quickstart Guide

1

Get your API key

Create a secure API key in the console to authorize requests. Keep your key confidential.

API Keys

API keys are created inside the **API 密钥 (API Keys)** section. All keys start with `sk-corr-`.
2

Configure authorization headers

Include the API key in the request headers for authorization:

http
Authorization: Bearer sk-corr-...
3

Send your first request

Point the API client to the Base URL and invoke the completion endpoint:

curl https://api.foxwire.ai/v1/chat/completions \
  -H "Authorization: Bearer $CORRY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

#스트리밍

stream: true로 설정하면 OpenAI 형식으로 토큰을 점진적으로 수신하며, data: [DONE]으로 종료됩니다.

python
resp = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello"}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

#매개변수

요청 본문은 OpenAI와 동일합니다. 일반적인 매개변수는 아래에 나와 있으며, 다른 OpenAI 필드도 지원됩니다:

매개변수유형설명
streamboolean응답을 스트리밍(SSE)
max_tokensinteger생성할 최대 토큰 수
temperaturenumber샘플링 온도, 0–2
toolsarray함수 호출(tools)
stopstring[]중지 시퀀스
reasoning_effortstring사고 활성화: low / medium / high

#오류 코드

오류는 표준 error 객체(message 및 type 필드 포함)를 반환합니다. 일반적인 상태 코드:

상태의미
401키가 유효하지 않거나 없습니다
402잔액이 부족합니다
404요청한 모델이 존재하지 않거나 사용할 수 없습니다
429요청 한도 초과 — 잠시 후 다시 시도하세요
502서비스를 일시적으로 사용할 수 없습니다. 다시 시도하세요