DanyAPI

Overview

What DanyAPI does.

Instead of the paid APIs it talks to the internal APIs of the free web clients chat.deepseek.com and chat.qwen.ai using server-side accounts. API users need no keys - all requests are made by the server accounts.

Features

  • GET /v1/models - model list
  • POST /v1/chat/completions - generation (stream and non-stream)
  • DeepSeek models: deepseek-v4-flash (default), deepseek-v4-pro (expert), deepseek-v4-vision (vision). Internal model_type: default, expert, vision.
  • Thinking is available for all DeepSeek models; web search works only for deepseek-v4-flash.
  • Attachments: deepseek-v4-vision accepts images only; deepseek-v4-flash accepts images (OCR) and text files; deepseek-v4-pro accepts no files. Per request: max 50 files, 100 MB each.
  • Qwen models: fetched from the account at startup (qwen3.8-max, qwen3.7-plus, …)
  • Thinking and web search (DeepSeek); thinking and search (Qwen). Thinking traces are exposed as reasoning_content (streamed live, both providers)
  • Tool calling (emulated): tools / tool_choice / parallel_tool_calls with proper finish_reason: "tool_calls" responses
  • JSON mode (emulated): response_format with json_object / json_schema
  • system messages are injected as the model's system prompt
  • Real token usage in responses, accumulated per conversation like the official API; streaming usage via stream_options.include_usage
  • On-disk session cache: conversations survive server restarts
  • GET /health - readiness probe
  • Multi-session: the message chain is stored server-side (session_id in the response), like the web clients. Stateless requests (no session_id) reuse the same server-side chat automatically based on the message context, so plain OpenAI-protocol clients keep their conversation too.

Quick usage

OpenAI SDK usage (drop-in replacement for the official API):

python
from openai import OpenAI

                    client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="dummy")
                    r = client.chat.completions.create(
                    model="deepseek-v4-flash",
                    messages=[{"role": "user", "content": "Hello!"}],
                    )
                    print(r.choices[0].message.content)
bash
curl http://127.0.0.1:8000/v1/chat/completions \
                    -H "Content-Type: application/json" \
                    -d '{"model": "deepseek-v4-flash", "messages": [{"role": "user", "content": "Hello!"}]}'

Multi-turn conversations, sessions, request fields, file attachments, tool calling, JSON mode and error handling are documented on the Usage page.