Skip to content

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.

GEThttps://api.maviapi.com/v1/sites/duck/v1/chat/completions5 credits per call

Parameters

NameRequiredExampleDescription
promptstring in queryOptionalSay hello in five words.the user message to send (up to 16000 characters).
modelstring in queryOptionalgpt-6-lunawhich 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 queryOptionalnonehow 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 queryOptionalNoneoptional earlier turns as a JSON list, e.g. [{"role":"user","content":"My name is Ana"},{"role":"assistant","content":"Hi Ana!"}].

Response fields

idstringe.g."chatcmpl-msg_08a53ba09079c19d016b0da0639c5c87d2af23a80d9c8358bb"
objectstringe.g."chat.completion"
createdintegere.g.1796055139
modelstringe.g."gpt-6-luna"
choicesobject[]3 fields
indexintegere.g.0
messageobject2 fields
rolestringe.g."assistant"
contentstringe.g."Hello there, hope you’re well today."
finish_reasonstringe.g."stop"
streamobject[]5 fields
idstringe.g."chatcmpl-msg_08a53ba09079c19d016b0da0639c5c87d2af23a80d9c8358bb"
objectstringe.g."chat.completion.chunk"
createdintegere.g.1796055139
modelstringe.g."gpt-6-luna"
choicesobject[]3 fields
indexintegere.g.0
deltaobject2 fields
rolestringe.g."assistant"
contentstringe.g."Hello"
finish_reasonnull
fetched_atstringe.g."2026-11-30T16:12:19.919Z"
ageintegere.g.0

Example request

Set MAVI_KEY to your API key. A successful call costs 5 credits per call, and a failed call costs nothing.

cURL
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.