Skip to navigation
DocsDocs for AI tools

Reference

Docs for AI tools

In short: These docs are available to AI tools as plain Markdown, through llms.txt, llms-full.txt, a .md version of every page, or a short project rules file.

Updated View .md
On this page

Docs for AI tools are plain-Markdown copies of these pages that let a coding assistant read the real docs instead of guessing, so it writes better integration code. A model’s training data rarely includes a gateway’s base URL, its model ids or its error codes, so without the docs it invents plausible ones. Every page here is available as plain Markdown, in the forms below, and all of them are generated from the same source as the pages you are reading, so they never drift apart.

What is llms.txt?

https://oneaiapikey.com/llms.txt is a short index of every docs page with a one-line summary and a link to its Markdown version, following the llms.txt convention. It starts with both base URLs and the header each format uses, then lists the pages by section (getting started, API, coding tools, chat apps). Give this URL to a tool that can follow links, such as an agent with a web fetch tool: it reads the index first and fetches only the pages it needs.

What is llms-full.txt?

https://oneaiapikey.com/llms-full.txt is the whole documentation in one Markdown file, pages separated by --- in the same order as the sidebar. Use it when a tool takes one document as context, such as a project knowledge file in a chat app. It is large: loading all of it into every request costs input tokens each time, so for a single task one page is usually enough and cheaper.

How do I get one page as Markdown?

  • Add .md to any docs URL, for example /docs/streaming.md. The response is text/markdown, with no navigation, scripts or styling.
  • Or use Copy as Markdown at the top of any page and paste it into your assistant.

Code examples in the Markdown versions use the same base URLs, model ids and environment variable names as the pages, and tables stay tables. From a terminal:

Fetch one page
curl -s https://oneaiapikey.com/docs/streaming.md

How do I point an agent at the right pages?

Agents with a fetch tool (Claude Code, Codex CLI, Cline and others) can read these URLs themselves. Name the pages in your prompt rather than pasting them, so the agent pulls the current version:

Prompt
Read https://oneaiapikey.com/docs/tool-calling.md and https://oneaiapikey.com/docs/errors.md.
Then add tool calling to src/agent.ts using the One AI API Key API with
model qwen-qwen3.8-27b:free, and retry only the errors those docs say are retryable.

Pages that agents most often need: Chat completions, Anthropic Messages, Streaming, Tool calling, Errors and Models.

Why add a rules file to my project?

Coding agents read a project rules file (AGENTS.md, CLAUDE.md, .cursor/rules and similar) on every task. Paste this block into yours so the agent uses the right base URL, key variable and model ids:

AGENTS.md
## One AI API Key API

- OpenAI format: base URL https://api.oneaiapikey.com/v1, header "Authorization: Bearer $ONEAIAPIKEY_API_KEY".
- Anthropic format (Claude models only): base URL https://api.oneaiapikey.com (no /v1; SDKs add /v1/messages), header "x-api-key".
- Read the key from the ONEAIAPIKEY_API_KEY environment variable. Never hard-code it or print it.
- Model ids: z-ai-glm-5.3-flash:free (fast), gpt-6-luna:free, qwen-qwen3.8-27b:free. Full list: https://oneaiapikey.com/docs/models.md
- For Claude, response_format is ignored in chat completions: use a forced tool call or /v1/messages.
- Docs index: https://oneaiapikey.com/llms.txt

Keep the block short: a rules file is sent with every request the agent makes, so a few lines that point to the docs cost less than a copy of the docs. Update the model ids when you change models; the models table has the current list.

↑ ↓ moveEnter openEsc close
New accounts$10 credit on sign-up
Claim $10 credit →