/modelsWAN3 Developer Platform
Una API para crear imágenes y vídeo.
Descubre modelos, importa material propio de forma segura, envía tareas idempotentes y lee resultados desde el almacenamiento de WAN3.
/uploadsMaterial propio verificado
/generationsTareas unificadas de imagen y vídeo
Tu primera generación
curl https://wan3.net/api/v1/generations \
-H "Authorization: Bearer $WAN3_API_KEY" \
-H "Idempotency-Key: video-job-001" \
-H "Content-Type: application/json" \
-d '{"model":"wan3","input":{"type":"text-to-video","workflow":"t2v","prompt":"A paper dragon crossing an orange-lit city","duration":5,"resolution":"720p","aspect_ratio":"16:9"}}'WAN3 Agent Skills · v1.0.0
Descarga Skills de imagen y vídeo
Los Skills llaman a WAN3 con tu clave API. Las credenciales internas permanecen en el servidor.
unzip wan3-agent-skills-v1.0.0.zip
export WAN3_API_KEY=wan3_live_...
# Copy wan3-image-generation or wan3-video-generation into your agent's skills directory.Texto a imagen
curl https://wan3.net/api/v1/generations \
-H "Authorization: Bearer $WAN3_API_KEY" \
-H "Idempotency-Key: image-job-001" \
-H "Content-Type: application/json" \
-d '{"model":"nano-banana","input":{"type":"text-to-image","prompt":"A ceramic fox in a quiet studio","aspect_ratio":"1:1"}}'Node.js
const response = await fetch("https://wan3.net/api/v1/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WAN3_API_KEY}`,
"Idempotency-Key": "video-job-001",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "wan3",
input: { type: "text-to-video", workflow: "t2v", prompt: "A paper dragon crossing a city", duration: 5, resolution: "720p" },
}),
});
console.log(await response.json());Python
import os, requests
response = requests.post(
"https://wan3.net/api/v1/generations",
headers={
"Authorization": f"Bearer {os.environ['WAN3_API_KEY']}",
"Idempotency-Key": "image-job-001",
},
json={"model": "nano-banana", "input": {"type": "text-to-image", "prompt": "A ceramic fox"}},
timeout=30,
)
print(response.json())Subida de material propio
# 1. Reserve: POST /api/v1/uploads with file_name, file_type, file_size
# 2. PUT bytes to data.upload_url with every data.required_headers value
# 3. Complete: POST /api/v1/uploads/{reservation_id}/complete
# 4. Pass the returned opaque media id in input.media_idsConsulta de estado
curl https://wan3.net/api/v1/generations/{generation_id} \
-H "Authorization: Bearer $WAN3_API_KEY"Contrato de errores estable
| code | HTTP | meaning |
|---|---|---|
| invalid_request | 400 | Request fields or owned media are invalid |
| unauthorized | 401 | API key is invalid, expired, or revoked |
| insufficient_credits | 402 | Account balance cannot fund the task |
| forbidden | 403 | The key does not have the required scope |
| not_found | 404 | The owned generation or media was not found |
| idempotency_conflict | 409 | The key was reused with another public request |
| rate_limited | 429 | Retry after the Retry-After interval |
| provider_rejected | 502 | The task was rejected and exposes no upstream details |
| service_busy | 503 | Retry safely with the same Idempotency-Key |
Las claves API se muestran una vez y deben guardarse en el servidor. Reutiliza la misma Idempotency-Key en reintentos y crea una nueva solo para una tarea nueva. Consulta modelos con GET /models y uso con GET /usage.