DG AI API
A totally free AI API for all — no login, no API key, no account. Powered by Cloudflare Workers, featuring 7 powerful models with no paywalls and live support at our Discord server.
WHY Why we built it
The problem: People could not access top-tier models for free without facing tedious identification formalities. Good AI APIs had aggressive paywalls.
How we solved it: We built an API on Cloudflare's Workers AI so that no one is left behind and everyone can power their applications with good LLMs.
What we offer: 7 distinct models with absolutely zero paywalls, plus live support at our Discord server.
LIM Limits
MDL Available models
DG AI offers seven different models behind one API. Hitting the base URL routes your request through a smart fallback system across all of them:
REQ Default request
Hitting the base URL (/v1/chat) routes your request through the fallback system across all 7 models:
// Example: How to connect your app to the Free AI API
async function askAI(userPrompt) {
const API_URL = "https://dg-ai.scriptsnsenses.workers.dev/v1/chat";
try {
const response = await fetch(API_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
messages: [
{
role: "system",
content: "You are a helpful assistant."
},
{
role: "user",
content: userPrompt
}
]
})
});
const data = await response.json();
// Extract the text response from the OpenAI-format JSON
const reply = data.choices[0].message.content;
console.log("AI Reply:", reply);
return reply;
} catch (error) {
console.error("Error calling the AI API:", error);
}
}
// Usage:
askAI("Give me a 3-word motto for a programmer.");
MDL Calling a specific model
Each model also has its own dedicated path under /v1/chat/ if you want to skip the fallback system and target one directly.
GPT-OSS (OpenAI - 120b)
// Example: Target the GPT-OSS model directly
async function askGPT(userPrompt) {
const API_URL = "https://dg-ai.scriptsnsenses.workers.dev/v1/chat/gpt-oss";
try {
const response = await fetch(API_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: userPrompt }
]
})
});
const data = await response.json();
const reply = data.choices[0].message.content;
console.log("ChatGPT Reply:", reply);
return reply;
} catch (error) {
console.error("Error calling GPT-OSS:", error);
}
}
askGPT("Write a funny 1-line error message for a broken server connection.");
DeepSeek (r1-distill-32b)
// Example: Target the DeepSeek model directly
async function askDeepSeek(userPrompt) {
const API_URL = "https://dg-ai.scriptsnsenses.workers.dev/v1/chat/deepseek";
try {
const response = await fetch(API_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: userPrompt }
]
})
});
const data = await response.json();
const reply = data.choices[0].message.content;
console.log("DeepSeek Reply:", reply);
return reply;
} catch (error) {
console.error("Error calling DeepSeek:", error);
}
}
askDeepSeek("Explain the concept of serverless computing in one simple sentence.");
RTE Model routes at a glance
| Model | Path | Format |
|---|---|---|
| All Models (Fallback) | /v1/chat | OpenAI |
| GPT-OSS (120b) | /v1/chat/gpt-oss | OpenAI |
| GLM 4.7 Flash | /v1/chat/glm | OpenAI |
| Llama 4 Scout (17b) | /v1/chat/llama-4-scout | OpenAI |
| DeepSeek R1 Distill (32b) | /v1/chat/deepseek | OpenAI |
| Gemma 2 (9b) | /v1/chat/gemma | OpenAI |
| Qwen 1.5 (14b) | /v1/chat/qwen | OpenAI |
| Qwen 2.5 Coder (32b) | /v1/chat/qwen-coder | OpenAI |
Note: Llama 4 Scout also supports image analysis via /chat/v1/vision.
+++ Discord perks
Joining the Discord unlocks extended access on top of the free tier:
- Extended limits: +22,000 requests
- Rate limit: 16 requests / 10 sec (2x the public rate)
- Access to the image generation feature (10 per day)