> For the complete documentation index, see [llms.txt](https://thegrid.ai/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thegrid.ai/docs/readme.md).

# Overview - The Grid Docs

Start seeing real savings on your LLM costs. Sign up and integrate in <5 mins.

The Grid is a spot market for AI inference, where you can both buy tokens and [sell back](/docs/concepts/reselling.md) the ones you won't use. Instead of picking a vendor and accepting their rate card, you pick a Grid instrument: usually a task type (text, code, or agent) and a quality tier (Standard, Prime, or Max), or a lab latest market such as `gpt-sol-latest` or `claude-opus-latest`. We route your request to a qualifying model from competing suppliers at a competitive market price. We're compatible with OpenAI Chat Completions and Anthropic Messages formats. Live pricing for each instrument is in the app at [thegrid.ai/pricing](https://thegrid.ai/pricing).

## Quick Links

| Page                                                                              | Contents                                                                                        |
| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [**Start here**](/docs/start-here/introduction.md)                                | Introduction to The Grid, plus a 5-minute quickstart from sign-up to first call                 |
| [**Benefits**](/docs/benefits/benefits.md)                                        | Lower, competitive token costs, quality enforced inference delivery, without any vendor lock-in |
| [**Current instruments**](/docs/instrument-specifications/current-instruments.md) | The instruments live on The Grid today, including tiered specs and lab latest markets           |
| [**Reselling tokens**](/docs/concepts/reselling.md)                               | Sell unused tokens from your Trading account back on the order book to control your spend       |
| [**Migrating**](/docs/integrations-and-best-practices/migrating-from-openai.md)   | Switch from your existing provider by changing three lines of code                              |
| [**Integrations**](/docs/integrations-and-best-practices/integrations.md)         | Use The Grid with your favorite AI tools and agent harnesses                                    |

## Machine-readable surfaces for agents and tools

We provide the following surfaces for programmatic discovery and automated setup by agents and agentic tools:

* **Documentation MCP server:** connect an MCP-compatible agent to `https://thegrid.ai/docs/~gitbook/mcp`. It can search the docs, fetch a page as Markdown, answer a question with source links, and send documentation feedback. Use it when an agent needs the current contract instead of copying API details into a prompt.
* **Plain-text documentation:** `https://thegrid.ai/docs/llms.txt` is the full index. Append `.md` to a documentation page URL to fetch that page as Markdown. These require no MCP client.
* **Platform API:** agents can authenticate with the OAuth 2.0 device flow, create and revoke consumption and trading keys, and manage account settings through `https://platform.api.thegrid.ai/v1`. Start with [Programmatic onboarding](/docs/start-here/programmatic-onboarding.md), then use the [Platform API reference](/docs/api-reference/platform-api.md).
* **Instrument discovery:** authenticated agents can call `GET https://api.thegrid.ai/v1/models` to list the Grid instruments available to their account and inspect metadata such as context length, supported parameters, and per-request limits. Use each returned `id` as the model value for inference requests. See the [Consumption API reference](/docs/api-reference/consumption-api.md#models).
* **Integration guides:** see [Integrations](/docs/integrations-and-best-practices/integrations.md) for setup with tools like Cline, Continue, Claude Code, Kilo Code, OpenCode, and harnesses like OpenClaw, CrewAI, Deep Agents, DeerFlow, and Hermes.

## Support and troubleshooting

Questions, integration issues, or feedback: <support@thegrid.ai>. For common questions (account setup, billing, instrument selection, error codes), start with [Migration and best practices → Troubleshooting](/docs/integrations-and-best-practices/troubleshooting.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://thegrid.ai/docs/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
