Model API
OpenAI-, Claude-, and Gemini-compatible endpoints for chat, completions, embeddings, images, audio, and moderations.
Management API Keys
Programmatic lifecycle management for Model API Keys — create, rotate, limit, disable, and revoke.
x402 API
Pay-per-inference access using the x402 payment protocol, with no pre-funded account balance.
Every Model API reference page has an interactive playground: fill in your API key and parameters, then press Send to test the endpoint live against
https://api.dgrid.ai.Model API
The Model API gives you a single gateway to 200+ leading AI models. Every endpoint is compatible with an ecosystem standard — OpenAI, Claude, or Gemini — so your existing SDKs and tooling work unchanged.Base URL
Authentication
All Model API endpoints authenticate with a bearer token:POST /v1/messages endpoint additionally requires:
Model naming
Themodel parameter uses the provider/model-name format — for example openai/gpt-4o — consistent across all DGrid-supported models. Call List models to discover the model IDs available to your key.
Endpoint families
| Family | Base path | Best for |
|---|---|---|
| Chat | /v1/chat/completions, /v1/responses, /v1/messages, /v1/models/{model}:generateContent | Conversational apps, multimodal assistants, tool calling |
| Completions | /v1/completions | Prompt-only text generation and legacy integrations |
| Embeddings | /v1/embeddings, /v1/engines/{engine}/embeddings | Search, clustering, retrieval, ranking |
| Images | /v1/images/generations, /v1/images/edits | Image generation and editing across model formats |
| Audio | /v1/audio/speech, /v1/audio/transcriptions, /v1/audio/translations | Speech synthesis, transcription, translation |
| Moderations | /v1/moderations | Content safety filtering and policy checks |
| Models | /v1/models | Discover available models and supported endpoint types |
| Realtime | /v1/realtime (WebSocket) | Low-latency streaming conversations |
Best practices
- Store the DGrid API key on the server side and never expose it in public clients or repositories.
- Prefer the OpenAI-compatible format when you want the broadest SDK compatibility with minimal migration effort.
- Use provider-native formats only when you need provider-specific payload features such as Gemini multimodal parts or Claude tool payloads.
- Keep request and response examples in sync with your target model family, because parameter names differ between OpenAI, Claude, and Gemini styles.

