> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dgrid.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with DGrid in under five minutes — create an account, generate an API key, and make your first call to a model through the AI Gateway.

DGrid is the decentralized smart network for AI — a single ecosystem that spans model access, model discovery, evaluation, and on-chain incentives. Whichever product you start with, every part of DGrid is reachable through one API key.

## Explore the DGrid ecosystem

> [card] [DGrid AI Gateway](https://docs.dgrid.ai/ai-gateway/overview.md)
>
> One OpenAI-, Claude-, and Gemini-compatible API for 200+ leading AI models, with Web3-native payments and intelligent routing.

> [card] [AI Arena](https://docs.dgrid.ai/ai-arena/overview.md)
>
> Blind model battles where community votes earn points redeemable for \$DGAI and improve DGrid's model routing.

> [card] [Dori Find Models](https://docs.dgrid.ai/dori.md)
>
> A natural-language advisor that turns your requirements into a shortlist of models, tested and compared for you.

> [card] [Model Marketplace](https://docs.dgrid.ai/api-reference/models/list-models.md)
>
> The open catalog of 200+ models and providers behind DGrid AI Gateway, browsable and callable through one API.

## Get started with DGrid AI Gateway

DGrid AI Gateway gives you a single, OpenAI-compatible API for 200+ leading models. This section takes you from zero to your first chat completion.

**1. Get your API key**

Obtain a valid `DGRID_API_KEY` by following the [key creation guide](https://blog.dgrid.ai/posts/2026-01-04/).

> [!NOTE]
>
> Your key secret is shown only once at creation time. Copy it immediately and store it in a secure location such as a secrets manager. Never expose it in client-side code or public repositories.

**2. Make your first request**

Send a chat completion request to the DGrid AI Gateway endpoint. The `model` parameter uses the `provider/model-name` format (for example `openai/gpt-4o`), consistent across all DGrid-supported models.

```bash cURL theme={null}
curl https://api.dgrid.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DGRID_API_KEY" \
  -d '{
    "model": "openai/gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": "What is the meaning of life?"
      }
    ]
  }'
```

```python Python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://api.dgrid.ai/v1",
    api_key="<DGRID_API_KEY>",
)

completion = client.chat.completions.create(
    model="openai/gpt-4o",
    messages=[
        {
            "role": "user",
            "content": "What is the meaning of life?"
        }
    ]
)

print(completion.choices[0].message.content)
```

```typescript TypeScript theme={null}
import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: 'https://api.dgrid.ai/v1',
  apiKey: '<DGRID_API_KEY>',
});

const completion = await openai.chat.completions.create({
  model: 'openai/gpt-4o',
  messages: [
    {
      role: 'user',
      content: 'What is the meaning of life?',
    },
  ],
});

console.log(completion.choices[0].message.content);
```

> [!TIP]
>
> DGrid is fully compatible with the OpenAI SDK — point `baseURL` at `https://api.dgrid.ai/v1` and your existing code works unchanged. Install it with `pip install openai` or `npm install openai`.

**3. Explore what's next**

> [card] [Model API Reference](https://docs.dgrid.ai/api-reference/introduction.md)
>
> Endpoint-level reference for chat, images, audio, embeddings, and more.

> [card] [Integrations](https://docs.dgrid.ai/ai-gateway/integrations.md)
>
> Connect DGrid to Claude Code, Cursor, Moltbot, and other tools.

> [card] [x402 Payments](https://docs.dgrid.ai/x402/overview.md)
>
> Pay per inference with the x402 protocol — no account balance required.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.