LlaDash API Documentation

The LlaDash API is a keyless, high-performance routing API. It dynamically splits tasks between Llama 3.1 8B for fast operations and ChatGPT OSS 120B for deep reasoning.

[Streaming Behavior] When using ?stream=true in plain text mode, internal <think> tags and their contents are automatically stripped from the stream, delivering only the clean final text. JSON/XML streaming preserves reasoning within dedicated fields.

Architecture Overview

Two robust models dynamically handle processing depending on the query tag:
1. Llama 3.1 8B (Fast): Performs safety moderation, route tag selection (clock/calc/search/think), quick answers, and localized title generation.
2. ChatGPT OSS 120B (Pro): Formulates high-level step-by-step reasoning, handles complex inquiries, and summarizes deep web search results.

Text Generation Endpoint

Send a prompt to receive AI inferences. Supports both GET and POST requests.

GET POST /ai/{prompt}

Query Parameters

NameTypeDescription
promptStringMax length is 2000 characters. Exceeding this returns 400 Bad Request.
jsonBooleanReturns results in JSON, containing structured thinking and title fields if active.
xmlBooleanReturns results in XML format.
streamBooleanStreams the response in real-time. Emits purely clean raw response text directly without SSE prefixes in text mode.
titleBooleanGenerates a localized title (under 15 chars) for every single query automatically.

Example Request (JSON + Title)

const url = 'https://api.ndnx.workers.dev/ai/What is AI?&json=true&title=true';
const response = await fetch(url, {
  headers: { 'User-Agent': 'MyAwesomeApp/1.0' }
});
const data = await response.json();
console.log(data);

Example Response

{
  "status": "success",
  "model": "openai/gpt-oss-120b",
  "thinking": "The user is asking for a definition of AI...",
  "title": "AIの定義",
  "answer": "人工知能(AI)とは、人間の知的振る舞いをコンピュータ上で再現する..."
}

Rate Limits

System-wide concurrent queue limits and model-specific quotas.

GET /ai/rate

Rate Limits

  • System Queue Limit: Max 20 concurrent requests system-wide (Returns HTTP 503 if busy).
  • Single IP Lock: Only 1 active request per client allowed at a time (Returns HTTP 429 on multi-send).
  • Llama 3.1 8B (Fast Model / Router): 200 Requests Per Minute / 10,000 requests per day limit.
  • ChatGPT OSS 120B (Pro Model / Generator): 30 Requests Per Minute / 1,000 requests per day limit.

Error Responses

  • 400 Bad Request: Prompt too long or invalid request.
  • 403 Forbidden: Bot detected, missing User-Agent, or security block.
  • 429 Too Many Requests: Global queue limit (20/min) exceeded.
  • 500 Internal Server Error: Backend API error or timeout.