Sozdai LogoDocs

Inicio rápido

Intégralo en minutos: totalmente compatible con OpenAI, solo cambia una base_url.

#Resumen

La API es totalmente compatible con OpenAI. Apunta la base_url de cualquier SDK o herramienta de OpenAI a la dirección de abajo y envía tu clave en el encabezado para llamar a cualquier modelo disponible.

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"}]
  }'

#Streaming

Establece stream: true para recibir tokens de forma incremental en formato OpenAI, terminados con 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="")

#Parámetros

El cuerpo de la solicitud coincide con OpenAI. A continuación se listan los parámetros comunes; también se admiten otros campos de OpenAI:

ParámetroTipoDescripción
streambooleanTransmitir la respuesta (SSE)
max_tokensintegerMáximo de tokens a generar
temperaturenumberTemperatura de muestreo, 0–2
toolsarrayLlamada a funciones (tools)
stopstring[]Secuencias de parada
reasoning_effortstringActivar razonamiento: low / medium / high

#Códigos de error

Los errores devuelven un objeto error estándar (con los campos message y type). Códigos de estado comunes:

EstadoSignificado
401Clave inválida o ausente
402Saldo insuficiente
404El modelo solicitado no existe o no está disponible
429Límite de tasa alcanzado: reintenta en breve
502Servicio temporalmente no disponible, reinténtalo