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. For request-level cost reconciliation, store theDGrid-Request-ID response header and use Get request billing details to retrieve token usage, pricing, and USD cost details.
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
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.

