Sand AISand AI MAGI-2MAGI-2 artık SandBase'de: yerel sesli 1080p videoŞimdi deneyin

DuckDuckGo AI Chat Answer

API dokümanları
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.

Fiyat
$0.01USD / çağrı
Yöntem
POST
Yanıt
JSON
Parametreler
1 gerekli · 3 isteğe bağlı

Oynatma Alanı

Girdi
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.
ÇıktıHazır

Çıktınız burada görünecek

Girdileri tamamlayın, ardından Çalıştır'a tıklayın.

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.

Daha fazlasını keşfedin

İlgili APIs

Tüm APIs
APIFiyatYanıt
DuckDuckGo$0.01 çağrı başınaJSON
DuckDuckGo$0.01 çağrı başınaJSON
DuckDuckGo$0.00015 çağrı başınaAsenkron JSON
DuckDuckGo$0.015 çağrı başınaJSON
DuckDuckGo$0.015 çağrı başınaJSON
DuckDuckGo$0.01 çağrı başınaJSON

Sorular

SSS

DuckDuckGo AI Chat Answer API'sini nasıl kullanırım?

SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/duckduckgo/ai-chat adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.

DuckDuckGo AI Chat Answer API'sinin fiyatı nedir?

çağrı başına $0.01, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.

DuckDuckGo AI Chat Answer API'si hangi parametreleri kabul eder?

Gerekli: q (string). İsteğe bağlı: model (string), subsequent_request_token (string) ve json_restrictor (string). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.

DuckDuckGo AI Chat Answer API'si ne döndürür?

Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron).

Bir DuckDuckGo geliştirici hesabına veya API anahtarına ihtiyacım var mı?

Hayır. DuckDuckGo AI Chat Answer, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. DuckDuckGo API erişimi için ayrıca başvuru yapmanız gerekmez.