Sand AISand AI MAGI-2MAGI-2 ist jetzt auf SandBase: 1080p-Video mit nativem AudioJetzt testen

DuckDuckGo AI Chat Answer

API-Dokumentation
https://api.sandbase.ai/v1/api/duckduckgo/ai-chat

Get the answer DuckDuckGo's Duck.ai chat gives for a question with a chosen chat model, with answer text and a token for follow-up questions.

Preis
$0.01USD / Aufruf
Methode
POST
Antwort
JSON
Parameter
1 erforderlich · 3 optional

Playground

Eingabe
Parameter defines the prompt you want to send to Duck AI, DuckDuckGo's AI chat.
Parameter defines the AI model that answers the prompt. It can be set to: `gpt-5.6-luna` - GPT-5.6 Luna `gpt-6-luna` - GPT-6 Luna `gpt-5.4-mini` - GPT-5.4 mini `claude-haiku-4-5` - Claude Haiku 4.5 `mistral-small-2603` - Mistral Small 4 `tinfoil/gpt-oss-120b` - gpt-oss 120B `tinfoil/gemma4-31b` - Gemma 4 31B It defaults to `gpt-5.6-luna`.
Parameter defines the token used to continue a Duck AI conversation. Pass this token with a new `q` to send a follow-up prompt that includes the previous prompts and answers as context (multi-turn). The token is returned by the API from your previous request using our Duck AI API. The token holds the whole conversation, so it grows with each turn. Conversations longer than about 16,000 characters (prompts and answers combined) can't be continued: the request becomes too long and is rejected.
Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
AusgabeBereit

Ihre Ausgabe wird hier angezeigt

Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.

API-README

DuckDuckGo AI Chat Answer

Get the answer DuckDuckGo's Duck.ai chat gives for a question with a chosen chat model, with answer text and a token for follow-up questions.

Request

curl -X POST "https://api.sandbase.ai/v1/api/duckduckgo/ai-chat" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "How does a heat pump work?"}'

The result is returned in outputs[0].data as structured JSON.

Parameters

NameTypeRequiredDescription
qstringYesParameter defines the prompt you want to send to Duck AI, DuckDuckGo's AI chat.
modelstringNoParameter defines the AI model that answers the prompt. It can be set to: gpt-5.6-luna - GPT-5.6 Luna gpt-6-luna - GPT-6 Luna gpt-5.4-mini - GPT-5.4 mini claude-haiku-4-5 - Claude Haiku 4.5 mistral-small-2603 - Mistral Small 4 `ti
subsequent_request_tokenstringNoParameter defines the token used to continue a Duck AI conversation. Pass this token with a new q to send a follow-up prompt that includes the previous prompts and answers as context (multi-turn). The token is returned by the API from you
json_restrictorstringNoParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

Pricing

$0.010 per successful call. Failed calls are not charged.

Mehr entdecken

Verwandte APIs

Alle APIs
APIPreisAntwort
DuckDuckGo$0.01 pro AufrufJSON
DuckDuckGo$0.01 pro AufrufJSON
DuckDuckGo$0.00015 pro AufrufAsynchrones JSON
DuckDuckGo$0.015 pro AufrufJSON
DuckDuckGo$0.015 pro AufrufJSON
DuckDuckGo$0.01 pro AufrufJSON

Fragen

FAQ

Wie verwende ich die DuckDuckGo AI Chat Answer API?

Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/duckduckgo/ai-chat mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.

Was kostet die DuckDuckGo AI Chat Answer API?

$0.01 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.

Welche Parameter akzeptiert die DuckDuckGo AI Chat Answer API?

Erforderlich: q (string). Optional: model (string), subsequent_request_token (string) und json_restrictor (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.

Was gibt die DuckDuckGo AI Chat Answer API zurück?

Eine JSON-Antwort, die in derselben HTTP-Anfrage zurückgegeben wird (synchron).

Benötige ich ein DuckDuckGo-Entwicklerkonto oder einen API-Schlüssel?

Nein. DuckDuckGo AI Chat Answer läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für DuckDuckGo API beantragen.