duck.ai Chat Completion API
Send a prompt to a Duck.ai model and return the answer in OpenAI chat-completions format, plus the stream as OpenAI chunks.
https://api.maviapi.com/v1/sites/duck/v1/chat/completions5 credits per callParameters
| Name | Required | Example | Description |
|---|---|---|---|
promptstring in query | Optional | Say hello in five words. | the user message to send (up to 16000 characters). |
modelstring in query | Optional | gpt-6-luna | which model answers: gpt-6-luna, gpt-5.4-mini, claude-haiku-5-5, mistral-small-2603, tinfoil/gpt-oss-120b, tinfoil/gemma4-31b. See /models.One of gpt-6-luna, gpt-5.4-mini, claude-haiku-5-5, mistral-small-2603, tinfoil/gpt-oss-120b, tinfoil/gemma4-31b |
reasoning_effortstring in query | Optional | none | how hard a reasoning model thinks; "none", "low" or "medium" (falls back to the closest level the model supports).One of none, low, medium |
historystring in query | Optional | None | optional earlier turns as a JSON list, e.g. [{"role":"user","content":"My name is Ana"},{"role":"assistant","content":"Hi Ana!"}]. |
Response fields
ide.g."chatcmpl-msg_08a53ba09079c19d016b0da0639c5c87d2af23a80d9c8358bb"objecte.g."chat.completion"createde.g.1796055139modele.g."gpt-6-luna"choices
indexe.g.0message
rolee.g."assistant"contente.g."Hello there, hope you’re well today."finish_reasone.g."stop"stream
ide.g."chatcmpl-msg_08a53ba09079c19d016b0da0639c5c87d2af23a80d9c8358bb"objecte.g."chat.completion.chunk"createde.g.1796055139modele.g."gpt-6-luna"choices
indexe.g.0delta
rolee.g."assistant"contente.g."Hello"finish_reasonfetched_ate.g."2026-11-30T16:12:19.919Z"agee.g.0Example request
Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.
curl 'https://api.maviapi.com/v1/sites/duck/v1/chat/completions' \
-H "Authorization: Bearer $MAVI_KEY"duck.ai Chat Completion API questions
What you get, what it costs and how to call it.
What does the duck.ai Chat Completion API return?
Send a prompt to a Duck.ai model and return the answer in OpenAI chat-completions format, plus the stream as OpenAI chunks. The response has id, object, created, model, choices, stream, fetched_at and age.
Which parameters does the duck.ai Chat Completion API take?
Every parameter of GET /v1/chat/completions is optional. You can pass prompt, model, reasoning_effort and history.
How much does one duck.ai Chat Completion API call cost?
One successful call costs 5 credits. A failed call costs nothing. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.98. The Free plan gives you 1,000 credits a month, with no credit card required. See plans and credit prices for everything after that.
How do I call the duck.ai Chat Completion API?
Send an HTTPS GET request to https://api.maviapi.com/v1/sites/duck/v1/chat/completions with your API key in the Authorization header, as in the example request on this page. Create a key on your API keys page, or try the endpoint first in the console with the free test key.
Is the duck.ai Chat Completion API official?
No. It is an independent, hosted API from maviapi for the public data on duck.ai, and it is not made, endorsed or supported by duck.ai. Its parameters and response fields are documented on this page.