Last updated
Changelogduck.ai API
HealthyRead-onlyStructured data from duck.ai. Generated from duck.ai.
/chat5 credits per callChat
Send a prompt to a Duck.ai model and return its full reply together with the stream it arrived in.
Authorization: Bearer <key> on every request.Parameters
the user message to send (up to 16000 characters).
which model answers: gpt-6-luna (GPT-6 Luna), gpt-5.4-mini, claude-haiku-5-5, mistral-small-2603 (Mistral Small 4), tinfoil/gpt-oss-120b, tinfoil/gemma4-31b. See /models.
how hard a reasoning model thinks; "none", "low" or "medium" (falls back to the closest level the model supports).
optional earlier turns of the conversation as a JSON list, e.g. [{"role":"user","content":"My name is Ana"},{"role":"assistant","content":"Hi Ana!"}].
Response fields
modele.g."gpt-6-luna"reasoning_efforte.g."none"replye.g."Hello there, hope you’re well today."titlee.g."Five-word greeting"message_ide.g."msg_0f8e6cc9a8dd4647016b0da061c9d087d283ef136858cf5f65"chunks
texte.g."Hello"createde.g.1796055137846chunk_counte.g.9total_mse.g.2311pagination
counte.g.9has_moree.g.falsenext_cursorfetched_ate.g."2026-11-30T16:12:18.056Z"agee.g.0curl "https://api.maviapi.com/v1/sites/duck/chat?prompt=Say%20hello%20in%20five%20words.&model=gpt-6-luna&reasoning_effort=none" \-H "Authorization: Bearer $MAVI_KEY"
{
"model": "gpt-6-luna",
"reasoning_effort": "none",
"reply": "Hello there, hope you’re well today.",
"title": "Five-word greeting",
"message_id": "msg_0f8e6cc9a8dd4647016b0da061c9d087d283ef136858cf5f65",
"chunks": [
{
"text": "Hello",
"created": 1796055137846
}
],
"chunk_count": 9,
"total_ms": 2311,
"pagination": {
"count": 9,
"has_more": false,
"next_cursor": null
},
"fetched_at": "2026-11-30T16:12:18.056Z",
"age": 0
}Get all the data, no code
Collect every page of GET /chat into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use duck.ai API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of duck.ai API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=duck -- npx -y '@maviapi/mcp'Import duck.ai API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/duck/openapi.json - Postman
https://api.maviapi.com/v1/apis/duck/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
Build with the duck.ai API
Choose a starting endpoint
- Chat
GET /chatSend a prompt to a Duck.ai model and return its full reply together with the stream it arrived in.
Parameters and response fields for GET /chat
Request parameters Name Type / location Required Description prompt string / query No the user message to send (up to 16000 characters). model string / query No which model answers: gpt-6-luna (GPT-6 Luna), gpt-5.4-mini, claude-haiku-5-5, mistral-small-2603 (Mistral Small 4), tinfoil/gpt-oss-120b, tinfoil/gemma4-31b. See /models. Allowed values: gpt-6-luna, gpt-5.4-mini, claude-haiku-5-5, mistral-small-2603, tinfoil/gpt-oss-120b, tinfoil/gemma4-31b. reasoning_effort string / query No how hard a reasoning model thinks; "none", "low" or "medium" (falls back to the closest level the model supports). Allowed values: none, low, medium. history string / query No optional earlier turns of the conversation as a JSON list, e.g. [{"role":"user","content":"My name is Ana"},{"role":"assistant","content":"Hi Ana!"}]. Response fields Field Type Description model string reasoning_effort string reply string title string message_id string chunks object[] chunks[].text string chunks[].created integer chunk_count integer total_ms integer pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Models
GET /modelsList the models a free Duck.ai visitor can chat with, with the reasoning efforts each accepts.
Parameters and response fields for GET /models
Response fields Field Type Description default string models object[] models[].id string models[].name string models[].creator string models[].reasoning_efforts string[] pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor null fetched_at string age integer - Chat Completion
GET /v1/chat/completionsSend a prompt to a Duck.ai model and return the answer in OpenAI chat-completions format, plus the stream as OpenAI chunks.
Parameters and response fields for GET /v1/chat/completions
Request parameters Name Type / location Required Description prompt string / query No the user message to send (up to 16000 characters). model string / query No 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. Allowed values: gpt-6-luna, gpt-5.4-mini, claude-haiku-5-5, mistral-small-2603, tinfoil/gpt-oss-120b, tinfoil/gemma4-31b. reasoning_effort string / query No how hard a reasoning model thinks; "none", "low" or "medium" (falls back to the closest level the model supports). Allowed values: none, low, medium. history string / query No optional earlier turns as a JSON list, e.g. [{"role":"user","content":"My name is Ana"},{"role":"assistant","content":"Hi Ana!"}]. Response fields Field Type Description id string object string created integer model string choices object[] choices[].index integer choices[].message object choices[].message.role string choices[].message.content string choices[].finish_reason string stream object[] stream[].id string stream[].object string stream[].created integer stream[].model string stream[].choices object[] stream[].choices[].index integer stream[].choices[].delta object stream[].choices[].delta.role string stream[].choices[].delta.content string stream[].choices[].finish_reason null fetched_at string age integer
Export duck.ai data to CSV
Each list below downloads as a CSV file with one row per record. Collect it into a dataset with "Get all the data, no code" under the console above. The dataset reads the list page by page, and you download it as CSV, JSON or JSONL.
| List | CSV columns |
|---|---|
ModelsGET /models | id, name, creator, reasoning_efforts |
A nested value (a list or an object) is written as JSON in one cell. How datasets and exports work
duck.ai API questions
What you get, what it costs and how to call it.
Is there an official duck.ai API?
This duck.ai API is not official. 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. Whether duck.ai offers a developer API of its own is a question for duck.ai. This one is ready to call with a maviapi key, and every endpoint and field it returns is documented on this page.
What data can I get from the duck.ai API?
The duck.ai API has 3 endpoints. Each returns JSON with the parameters and fields documented above:
- GET
/chat: Send a prompt to a Duck.ai model and return its full reply together with the stream it arrived in. - GET
/models: List the models a free Duck.ai visitor can chat with, with the reasoning efforts each accepts. - GET
/v1/chat/completions: Send a prompt to a Duck.ai model and return the answer in OpenAI chat-completions format, plus the stream as OpenAI chunks.
How much does the duck.ai API cost?
Calls are paid in credits from your maviapi plan, and only successful calls are charged. Its endpoints cost 1 to 5 credits per call, and each one shows its price above. On the Hobby plan ($49 a month for 250,000 credits), 1,000 calls cost about $0.20 to $0.98, depending on the endpoint. Failed calls are free. 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 API?
Send an HTTPS request to the endpoint with your API key in the Authorization header. For example, GET /chat:
curl 'https://api.maviapi.com/v1/sites/duck/chat' \
-H "Authorization: Bearer $MAVI_KEY"Create a key on your API keys page, or try any endpoint first in the console above with the free test key.
What are the ways to get duck.ai data as JSON?
Each way to get duck.ai data as JSON fits a different need:
- Your own scraper: Full control and no vendor, but the parsing, the blocked requests and the repairs after every change on duck.ai are yours. Better for a one-off pull from a page that rarely changes.
- Apify: A marketplace of Actors you run, where input, output and price are set by each Actor. Better when an Actor already returns what you need, or you want to host your own code. See maviapi vs Apify.
- RapidAPI: A hub of APIs added by many providers, called with one RapidAPI key and priced per API. Better when you already use the hub and one of its APIs covers what you need. Source: RapidAPI docs.
- maviapi: The duck.ai API on this page: 3 documented endpoints, a published response schema and one key for the whole catalog. Better when this data is part of your product and you do not want to maintain a scraper.
What happens when duck.ai changes its layout?
Your code does not change. maviapi keeps the duck.ai API working when duck.ai changes its pages, so you keep calling the same endpoints and get JSON in the shape documented here. See its current health on the status page and what changed in its changelog.
Will an update break my duck.ai API integration?
No. An endpoint you use never changes shape: new fields, optional parameters and endpoints are added beside it, and a change that would break a call ships as a new endpoint. Ignore response fields you do not know, and follow the changelog for what is new.
Related APIs
- Tripadvisor API
Trip-planning data from Tripadvisor: geo search plus attractions, restaurants and hotels by location (geo_id), with…
- Songkick Concerts API
Upcoming concerts and music festivals in any city from Songkick, for a date window, with venues, performers, prices…
- Eventbrite API
Events listed on Eventbrite for a city and date range: dates, venue with address and coordinates, image and summary…