Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

DuckDuckGo AI Chat Answer

Документация API
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.

Цена
$0.01USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 3 необязательных

Песочница

Ввод
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.
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

README по API

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.

Посмотреть больше

Связанные APIs

Все APIs
APIЦенаОтвет
DuckDuckGo$0.01 за запросJSON
DuckDuckGo$0.01 за запросJSON
DuckDuckGo$0.00015 за запросАсинхронный JSON
DuckDuckGo$0.015 за запросJSON
DuckDuckGo$0.015 за запросJSON
DuckDuckGo$0.01 за запросJSON

Вопросы

FAQ

Как использовать API DuckDuckGo AI Chat Answer?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/duckduckgo/ai-chat, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API DuckDuckGo AI Chat Answer?

$0.01 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API DuckDuckGo AI Chat Answer?

Обязательные: q (string). Необязательные: model (string), subsequent_request_token (string) и json_restrictor (string). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API DuckDuckGo AI Chat Answer?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно).

Нужен ли мне аккаунт разработчика DuckDuckGo или API key?

Нет. DuckDuckGo AI Chat Answer работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API DuckDuckGo.