/v1/chat/completions- OpenAI input
model, messages, stream- Gateway behavior
- Model passes through; developer becomes system; max_completion_tokens becomes max_tokens.
OPENAI-COMPATIBLE GATEWAY
Use existing OpenAI clients for Agnes chat, image, image-editing, and video generation—without a server-side API key or hidden model mapping.
curl https://agnes-compatible-gateway.zo.deno.net/v1/chat/completions \
-H "Authorization: Bearer $AGNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "agnes-2.0-flash",
"messages": [{"role":"user","content":"Hello, Agnes."}],
"stream": true
}'USE YOUR OWN KEY
Your Agnes key stays only in this page's memory.
Never saved to cookies, localStorage, or analytics.
Your response will appear here.
EXPLICIT, NOT MAGICAL
The gateway transforms only the mismatches it can resolve safely.
| Capability / route | OpenAI input | Gateway behavior | Support |
|---|---|---|---|
Chat/v1/chat/completions | model, messages, stream | Model passes through; developer becomes system; max_completion_tokens becomes max_tokens. | Transformed |
Image generation/v1/images/generations | prompt, model, size, n | Defaults size to 1024x1024; response_format is converted; n fans out atomically. | Transformed |
Image edits/v1/images/edits | multipart image / image[] | Files become Data URIs in Agnes extra_body.image. | Transformed |
Video creation/v1/videos | prompt, seconds, size | seconds becomes 24 fps frame count; size is split into width and height. | Transformed |
Video retrieval/v1/videos/{id} | GET /v1/videos/{id} | The public ID is the stateless Agnes task ID. | Pass-through |
Video content/v1/videos/{id}/content | GET /v1/videos/{id}/content | Completed media is streamed; thumbnail and spritesheet variants fall back to video. | Partial |
/v1/chat/completionsmodel, messages, stream/v1/images/generationsprompt, model, size, n/v1/images/editsmultipart image / image[]/v1/videosprompt, seconds, size/v1/videos/{id}GET /v1/videos/{id}/v1/videos/{id}/contentGET /v1/videos/{id}/contentDEPLOY YOUR WAY
Run the published image with one optional upstream URL. No database or secrets service is required.
AGNES_BASE_URL=https://apihub.agnes-ai.com/v1DIAGNOSE FROM THE EDGE
Check the Agnes key and whether it can use the requested model. The gateway never substitutes another credential.
Verify the gateway base URL and compatible route. Video APIs use /v1/videos, not /v1/video/generations.
The response comes from Agnes account limits. Inspect Retry-After and the raw response before retrying.
Confirm the model, image type, size, and video duration. Ignored optional fields are listed in the response headers.
Media jobs can be long-running. Check gateway logs by request ID; use Docker if an edge runtime deadline is too short.
FAQ
No. It is an independent, open-source compatibility gateway built against the public Agnes API documentation.
No. Production has no server-side key. This tester keeps your key in memory only and sends it with each request.
The gateway does not maintain a model catalog or aliases. Supply any model name your Agnes account supports.
Some Agnes capabilities have no exact OpenAI equivalent. The compatibility matrix documents every pass-through, conversion, and partial behavior.
Yes. Deploy it to Deno Deploy or run the multi-architecture Docker image.
Open a GitHub issue with the route, redacted request, response status, and request ID. Never include your API key.