Skip to content

Document LLM chat completions; sync alt_formats from the latest API spec - #23

Merged
Pietrus-914 merged 1 commit into
mainfrom
docs/llm-chat-completions
Nov 20, 2026
Merged

Pietrus-914 merged 1 commit into
mainfrom
docs/llm-chat-completions

Conversation

@Pietrus-914

Copy link
Copy Markdown
Contributor

Summary

POST https://oai.deapi.ai/v1/chat/completions is live in production, but the docs still said it was "Not available". This PR documents it and syncs the latest backend spec dump (client-api-v2-docs, 2026-11-20).

Chat completions (LLMs)

  • openai-compatibility.mdx has a new section, "Chat completions (LLMs)":
    • all 13 models with context size, max output, input modalities, per-1M-token prices (read from /v1/models on 2026-11-20), and json_schema / stop support
    • examples in Python, Node and cURL
    • streaming (SSE plus include_usage), tool calling, structured outputs, image input, reasoning_effort and reasoning_content, usage.cost and X-DeAPI-Cost, and the chat-specific error codes
  • LLM entries in GET /v1/models: documented the extra fields (context_length, architecture, top_provider, supported_parameters, pricing)
  • Corrections found while testing:
    • Successful /v1 responses now carry X-RateLimit-*. The old warning said they never do.
    • Idempotency-Key is not applied to chat. A repeated request runs and is billed again.
    • Streaming is supported on chat only.
    • /v1/responses still answers 404.
  • Other pages: models (new "LLMs (chat models)" section), pricing (LLM row plus a note that there is no /price endpoint), introduction, FAQ, and Open WebUI (new "Chat with deAPI LLMs" setup and troubleshooting rows).

Spec sync: alt_formats

  • Added alt_formats (boolean, default false) to Txt2Img, Img2Img, ImageUpscale and ImageRemoveBg in openapi.json and openapi-v2.json, and updated the results_alt_formats description.
  • The upstream videos/replacements paths stay out of the spec on purpose (see da44f13).
  • Noted on the WebSockets and Webhooks pages that results_alt_formats needs alt_formats: true.

Live verification (2026-11-20, test account)

  • All 13 LLMs answer 200 in 1–7 s.
  • Request features tested: streaming with include_usage, a full tool-call round trip, json_schema, json_object, base64 image input, developer role, and reasoning_effort (none, minimal, low, high, xhigh).
  • Errors tested: missing model or messages, unknown model, non-chat model, image sent to a text-only model, unreachable image URL, n=2, logprobs, top_logprobs, stop on models that don't list it, temperature: 5, and an invalid reasoning_effort.
  • alt_formats: the same Flux1schnell job returns results_alt_formats: null without the flag and both JPG and WebP with it. On multipart (Ben2), true and 1 both work.
  • Broken links: mintlify broken-links reports no new broken links compared with main.

Not in this PR

  • llms.txt (served from deapi.ai, not from this repo) is updated locally and has to be deployed separately. That update also fixes the 404 link app.deapi.ai/dashboard/api-keys, which becomes /settings/api-keys.

🤖 Generated with Claude Code

- openai-compatibility: new "Chat completions (LLMs)" section for
  POST /v1/chat/completions (13 models, prices, streaming, tools,
  structured outputs, image input, reasoning, usage.cost, errors);
  LLM fields in /v1/models; success responses now carry X-RateLimit-*;
  Idempotency-Key is not applied to chat
- models, pricing, introduction, FAQ, Open WebUI: mention the LLMs
- openapi(-v2).json: add alt_formats to txt2img, img2img, upscale and
  background removal; results_alt_formats is opt-in (verified live)
- websockets, webhooks: note that results_alt_formats needs alt_formats

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Pietrus-914
Pietrus-914 merged commit a6d0dce into main Nov 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant