Inicio rápido
Intégralo en minutos: totalmente compatible con OpenAI, solo cambia una base_url.
LLM Chat completions
Call leading models like Claude, GPT-4, and DeepSeek via a single OpenAI-compatible API endpoint.
Media generation
Submit asynchronous media generation tasks for image, video, and music models with simple polling.
Prompt caching
Save up to 90% in token pricing on supported models by caching long, static context sequences.
Deep thinking models
Control reasoning effort (low/medium/high) for models like o1/o3 and DeepSeek-R1 natively.
#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.
https://api.foxwire.ai/v1#3-Step Quickstart Guide
Get your API key
Create a secure API key in the console to authorize requests. Keep your key confidential.
API Keys
Configure authorization headers
Include the API key in the request headers for authorization:
Authorization: Bearer sk-corr-...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].
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ámetro | Tipo | Descripción |
|---|---|---|
stream | boolean | Transmitir la respuesta (SSE) |
max_tokens | integer | Máximo de tokens a generar |
temperature | number | Temperatura de muestreo, 0–2 |
tools | array | Llamada a funciones (tools) |
stop | string[] | Secuencias de parada |
reasoning_effort | string | Activar 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:
| Estado | Significado |
|---|---|
401 | Clave inválida o ausente |
402 | Saldo insuficiente |
404 | El modelo solicitado no existe o no está disponible |
429 | Límite de tasa alcanzado: reintenta en breve |
502 | Servicio temporalmente no disponible, reinténtalo |