DuckAi is a lightweight Python client for DuckDuckGo's experimental AI chat interface, reverse-engineered and revived based on earlier implementations that no longer function.
It allows you to send prompts to a variety of models through DuckDuckGoβs unofficial duckchat API.
- β Supports multiple models: GPT-4o, Claude, LLaMA, Mixtral, and more
- β
Automatically handles
x-vqd-hashvalidation - β Uses browser-like headers to avoid detection
- β Clean and minimal interface
- β Pythonic and production-ready
pip install py_mini_racer requestsfrom DuckAi import DuckAi
duck = DuckAi()
response = duck.chat("What is the capital of Iceland?")
print(response)You can use the models() method to see supported models:
duck.models()Returns:
[
"gpt-4o-mini",
"o3-mini",
"claude-3-haiku-20240307",
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
"mistralai/Mixtral-8x7B-Instruct-v0.1"
]This project is based on an earlier version of a DuckDuckGo AI chat wrapper that no longer works. This version was refactored, modernized, and made operational again.
If you are a representative of DuckDuckGo or another affected party and believe this project violates your terms or policies, please contact me directly.
π± Signal contact: https://signal.me/#eu/q8RNQUVVlXzL577K_qXnYVlAtcD6rmAtwK3Cu5DfpWQB_28YcPZN8Zeu_HZoWgwT
This project is not affiliated with DuckDuckGo. It is an independent, unofficial tool built for educational and personal use.