Quickstart
eWest gives you video, image and language models behind one OpenAI-compatible API. Requests go to https://api.ewest.ai/v1 with your key in the Authorization header.
- Create an account and copy the key (it is shown once).
- Set it as an environment variable:
export EWEST_KEY=sk-… - Send your first request (below). Usage appears in the console under Requests and Usage.
Chat
POST /v1/chat/completions, compatible with the OpenAI SDKs. Set "stream": true for long answers: requests without streaming are cut off after 100 seconds.
curl https://api.ewest.ai/v1/chat/completions \
-H "Authorization: Bearer $EWEST_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "ewest/gemini-flash", "stream": true,
"messages": [{"role": "user", "content": "Hello!"}]}'Images
POST /v1/images/generations returns image URLs on cdn.ewest.ai, kept for 7 days. Ask for "response_format": "b64_json" to also get the bytes.
curl https://api.ewest.ai/v1/images/generations \
-H "Authorization: Bearer $EWEST_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "ewest/flux-schnell", "prompt": "a cozy cabin in the snow"}'
# → {"data": [{"url": "https://cdn.ewest.ai/img/…"}]}Video jobs
Video takes from seconds to minutes, so it runs as a job. POST /v1/videos/generations returns 202 with a job; then follow it in one of three ways:
GET /v1/jobs/{id}/events: Server-Sent Events with liveprogressandeta_seconds.GET /v1/jobs/{id}: poll every few seconds."webhook_url"in the request: we POST the finished job to it.
eta_seconds is null when a job runs longer than usual. Finished videos are on cdn.ewest.ai for 7 days.
# 1. Create the job
curl https://api.ewest.ai/v1/videos/generations \
-H "Authorization: Bearer $EWEST_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "ewest/veo-3.1-fast", "prompt": "A red fox walks through fresh snow"}'
# → 202 {"id": "job_…", "status": "queued", "progress": 0, "eta_seconds": …}
# 2. Follow live progress (Server-Sent Events), or poll GET /v1/jobs/job_…
curl -N https://api.ewest.ai/v1/jobs/job_…/events -H "Authorization: Bearer $EWEST_KEY"Trace IDs
Every response carries an x-request-id header (for video, the job ID). Paste it into Console → Requests to see the request, response, timing and cost. Prompts and outputs are kept for 7 days; usage and cost permanently.
Errors
Errors use the OpenAI shape: {"error": {"message", "type", "code", "param"}}.
| 400 | invalid_request_error | A parameter is missing or out of range; param names it. |
| 401 | auth_error | Missing, invalid, expired or blocked key. |
| 402 | insufficient_budget | The key's budget would be exceeded. |
| 403 | permission_error | The key is not allowed to use this model. |
| 404 | not_found_error | Unknown job or model. |
| 502 / 503 | api_error | Temporary problem upstream; retry with backoff. |
Models
Use the ID in the model field. Machine-readable list: /v1/catalog.
| Model | ID | Type | Limits |
|---|---|---|---|
| Gemini 2.5 Flash | ewest/gemini-flash | language | 1M context |
| Claude Haiku 4.5 | ewest/claude-haiku | language | 200K context |
| Claude Sonnet 5.5 | ewest/claude-sonnet | language | 1M context |
| FLUX.1 [schnell] | ewest/flux-schnell | image | up to 1536 px |
| Gemini 2.5 Flash Image | ewest/gemini-flash-image | image | 1024 px |
| Veo 3.1 Fast | ewest/veo-3.1-fast | video | 4–8 s · up to 1080p |
| Seedance 2.5 | ewest/seedance-2.5 | video | 4–10 s · up to 1080p |
| MiniMax H3 Max | ewest/minimax-h3-max | video | 5–10 s · up to 768p |