# DGrid AI Docs > Documentation for DGrid AI: The Decentralized Smart Network of AI ## Documentation ### GET STARTED - [DGrid AI Documentation](https://docs.dgrid.ai/index.md): Access 200+ leading AI models through DGrid's Web3-native gateway. Explore guides, the API reference, tokenomics, and the $DGAI economy. - [Quickstart](https://docs.dgrid.ai/quickstart.md): 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. ### CORE CONCEPTS - [What We Do](https://docs.dgrid.ai/what-we-do.md): DGrid's mission to build a trusted, decentralized AI network that efficiently connects model providers with users and developers worldwide. - [Background](https://docs.dgrid.ai/background.md): Market pain points, industry gaps, and the centralized AI infrastructure problems that motivated DGrid's decentralized inference network. - [DGrid's Solution](https://docs.dgrid.ai/dgrid-solution.md): Core architecture, key modules, and technical design of DGrid AI's decentralized inference network for routing, verification, and incentives. - [Node Operators](https://docs.dgrid.ai/node-operators.md): Why node operators are the backbone of DGrid's decentralized AI network and how they earn rewards by contributing GPU compute to model inference. ### AI GATEWAY - [AI Gateway](https://docs.dgrid.ai/ai-gateway/overview.md): DGrid AI Gateway provides one unified, OpenAI-compatible API to call 200+ leading AI models with crypto billing, routing, and global edge access. - [Redeem a DGrid Credit Code](https://docs.dgrid.ai/ai-gateway/redeem-credit-code.md): Redeem a DGrid Credit Code from the Billing page and apply the credits to your DGrid account. - [Auto Deposit](https://docs.dgrid.ai/ai-gateway/auto-deposit.md): Set up automatic USDT deposits based on your recharge balance, and manage your wallet authorization and cumulative spending limit. - [Notifications](https://docs.dgrid.ai/ai-gateway/notifications.md): Configure email, Lark, and custom Webhook notifications for recharge balance and Auto Deposit events. - [Free Models Router](https://docs.dgrid.ai/ai-gateway/free-models-router.md): Use DGrid's free intelligent inference gateway for everyday AI tasks with automatic model routing and fair-use rate limits. - [Supported Countries and Regions](https://docs.dgrid.ai/ai-gateway/supported-regions.md): Regional availability, supported countries, and geographic restrictions for the DGrid AI Gateway, including IP and compliance limitations. #### Integration Tutorials - [Integration Tutorials](https://docs.dgrid.ai/ai-gateway/integrations.md): Connect DGrid AI Gateway to Cursor, Claude Code, Codex, OpenClaw, Hermes Agent, and Vercel AI SDK with step-by-step tutorials. - [Use Cursor with DGrid](https://docs.dgrid.ai/ai-gateway/integrations/cursor.md): Connect Cursor to DGrid AI Gateway with your API key, a custom base URL, and a complete model ID. - [Use Claude Code with DGrid](https://docs.dgrid.ai/ai-gateway/integrations/claude-code.md): Connect Claude Code CLI or the desktop Code tab to DGrid AI Gateway and verify your first response. - [Use Codex with DGrid](https://docs.dgrid.ai/ai-gateway/integrations/codex.md): Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API. - [Use OpenClaw with DGrid](https://docs.dgrid.ai/ai-gateway/integrations/openclaw.md): Install OpenClaw, configure DGrid as a custom provider, and send your first message in the dashboard. - [Use Hermes Agent with DGrid](https://docs.dgrid.ai/ai-gateway/integrations/hermes-agent.md): Configure a custom provider in Hermes Agent and use DGrid models through Chat Completions. - [Use Vercel AI SDK with DGrid](https://docs.dgrid.ai/ai-gateway/integrations/vercel-ai-sdk.md): Call DGrid from a Node.js script using Vercel AI SDK and its OpenAI-compatible provider. ### AI ARENA - [AI Arena](https://docs.dgrid.ai/ai-arena/overview.md): Compare AI models, earn contribution points, redeem them for $DGAI, and compete for a weekly 50,000-point prize pool. - [Arena for Agent](https://docs.dgrid.ai/ai-arena/arena-for-agent.md): Create AI Agents that automatically evaluate models in DGrid AI Arena and earn points redeemable for $DGAI. ### ECOSYSTEM - [Dori Find Models](https://docs.dgrid.ai/dori.md): Dori is DGrid's natural-language assistant for discovering, comparing, and evaluating large language models across providers, prices, and benchmarks. - [DClaw](https://docs.dgrid.ai/dclaw.md): DClaw is DGrid's one-click deployment layer for spinning up personal AI agents on decentralized nodes without managing infrastructure or servers. ### $DGAI TOKEN - [What is $DGAI?](https://docs.dgrid.ai/what-is-dgai.md): $DGAI is the native utility token of DGrid AI, used for staking, paying for inference, governance voting, and distributing network rewards. - [Core Functions](https://docs.dgrid.ai/core-functions.md): The four core functions of $DGAI — staking, payment, incentives, and governance — that power the DGrid decentralized AI inference network. - [Circulation Mechanism](https://docs.dgrid.ai/circulation-mechanism.md): How the $DGAI token flows through the DGrid economy via staking, inference payments, rewards, and buyback to form a closed-loop value cycle. - [Token Distribution](https://docs.dgrid.ai/token-distribution.md): How the fixed 1 billion $DGAI supply is allocated across nodes, community, team, investors, airdrops, and initial liquidity, including lockups and release schedules. ### GENESIS PREMIUM - [Program Overview](https://docs.dgrid.ai/premium/program-overview.md): What the DGrid Genesis Premium License is, why early participants should join, and the benefits unlocked by becoming a Genesis Member. - [Exclusive Benefits](https://docs.dgrid.ai/premium/exclusive-benefits.md): Exclusive economic, resource, governance, and ecosystem benefits available only to DGrid Genesis Members through the Premium License program. - [Purchase & Activation](https://docs.dgrid.ai/premium/purchase-and-activation.md): Step-by-step instructions for buying the DGrid Genesis Pass and activating the Premium License to unlock Genesis Member benefits and rewards. - [Incentive Mechanism & Rewards](https://docs.dgrid.ai/premium/incentive-mechanism-and-rewards.md): How DGrid Genesis Members earn and redeem tDGAI, IOTX, and referral rewards through the Premium License incentive and rebate program. - [Compliance and Regulatory](https://docs.dgrid.ai/premium/compliance-and-regulatory.md): Regulation S compliance, disclosures, and regulatory principles that apply to purchases of the DGrid Genesis Premium License worldwide. - [Legal Disclaimer](https://docs.dgrid.ai/premium/legal-disclaimer.md): Important legal disclaimer, risk warnings, and liability terms that govern participation in the DGrid Genesis Premium License program. ### RESOURCES - [Roadmap](https://docs.dgrid.ai/roadmap.md): DGrid AI development roadmap covering mainnet launch, decentralized inference milestones, $DGAI token unlocks, and ecosystem product releases. - [Academic Research](https://docs.dgrid.ai/academic-research.md): Academic papers on decentralized AI inference, Proof of Quality (PoQ), SFT data procurement, and trading agent evaluation. - [Terms of Service](https://docs.dgrid.ai/ai-gateway/terms-of-service.md): Legal terms, acceptable use policy, and service conditions governing access to and use of the DGrid AI Gateway and Model API endpoints. ## API Reference ### GETTING STARTED - [Introduction](https://docs.dgrid.ai/api-reference/introduction.md): Overview of DGrid’s Model API, Management API, and x402 API, with authentication, base URLs, and Webhook integration resources. ### MODEL API #### Chat - [Create chat completion](https://docs.dgrid.ai/api-reference/chat/create-chat-completion.md): OpenAI-compatible Chat Completions for standard multi-turn chat, structured output, and tool calling. Model names use the `provider/model-name` format, for example `openai/gpt-4o`. Image-capable models can also return generated images through this endpoint. - [Create response](https://docs.dgrid.ai/api-reference/chat/create-response.md): OpenAI Responses API for stateful flows, reasoning-specific options, and newer OpenAI tooling patterns. - [Create message (Claude)](https://docs.dgrid.ai/api-reference/chat/create-message.md): Claude Messages API for Anthropic-compatible payloads, tool use, and system prompts. - [Generate content (Gemini)](https://docs.dgrid.ai/api-reference/chat/generate-content.md): Gemini-native generateContent interface for text chat, multimodal media recognition (images, audio, video), speech synthesis, and image generation with structured parts. Use `generationConfig` to request specific response modalities such as speech (`speechConfig`) or images (`imageConfig`). - [Gemini Media Recognition](https://docs.dgrid.ai/api-reference/chat/gemini-media-recognition.md): Gemini-native generateContent interface for text chat, multimodal media recognition (images, audio, video), speech synthesis, and image generation with structured parts. Use `generationConfig` to request specific response modalities such as speech (`speechConfig`) or images (`imageConfig`). #### Completions - [Create completion](https://docs.dgrid.ai/api-reference/completions/create-completion.md): Classic OpenAI-compatible text completion for single-prompt generation workloads that do not require a multi-message chat schema. #### Embeddings - [Create embeddings](https://docs.dgrid.ai/api-reference/embeddings/create-embedding.md): OpenAI-compatible embeddings for retrieval, clustering, and semantic similarity workloads. - [Create embeddings (legacy engines)](https://docs.dgrid.ai/api-reference/embeddings/create-engine-embedding.md): Legacy engine-based embeddings path format for older SDK integrations. #### Images - [Gemini Native Format](https://docs.dgrid.ai/api-reference/images/gemini-native-format.md): Gemini-native generateContent interface for text chat, multimodal media recognition (images, audio, video), speech synthesis, and image generation with structured parts. Use `generationConfig` to request specific response modalities such as speech (`speechConfig`) or images (`imageConfig`). - [OpenAI Chat Format](https://docs.dgrid.ai/api-reference/images/openai-chat-format.md): OpenAI-compatible Chat Completions for standard multi-turn chat, structured output, and tool calling. Model names use the `provider/model-name` format, for example `openai/gpt-4o`. Image-capable models can also return generated images through this endpoint. - [Create image](https://docs.dgrid.ai/api-reference/images/create-image.md): OpenAI-compatible image generation. Also accepts Qwen-compatible payloads (`wanx-v1` style models) using an `input.messages` wrapper instead of `prompt`. - [Qwen Image Generations](https://docs.dgrid.ai/api-reference/images/qwen-image-generations.md): OpenAI-compatible image generation. Also accepts Qwen-compatible payloads (`wanx-v1` style models) using an `input.messages` wrapper instead of `prompt`. - [Edit image](https://docs.dgrid.ai/api-reference/images/edit-image.md): Edit an uploaded image with an optional mask using the OpenAI-compatible image editing endpoint. Also accepts Qwen-compatible JSON payloads with an `input.messages` wrapper. - [Qwen Image Edits](https://docs.dgrid.ai/api-reference/images/qwen-image-edits.md): Edit an uploaded image with an optional mask using the OpenAI-compatible image editing endpoint. Also accepts Qwen-compatible JSON payloads with an `input.messages` wrapper. #### Audio - [Native Gemini Format](https://docs.dgrid.ai/api-reference/audio/native-gemini-format.md): Gemini-native generateContent interface for text chat, multimodal media recognition (images, audio, video), speech synthesis, and image generation with structured parts. Use `generationConfig` to request specific response modalities such as speech (`speechConfig`) or images (`imageConfig`). - [Create speech](https://docs.dgrid.ai/api-reference/audio/create-speech.md): Convert text into natural speech with the OpenAI-compatible audio speech interface. Returns a binary audio stream — save the response body directly to a file. - [Create transcription](https://docs.dgrid.ai/api-reference/audio/create-transcription.md): Transcribe uploaded audio into text with the OpenAI-compatible Whisper-style interface. Supported formats: FLAC, MP3, MP4, MPEG, MPGA, M4A, OGG, WAV, and WebM. - [Create translation](https://docs.dgrid.ai/api-reference/audio/create-translation.md): Translate uploaded audio into English with the OpenAI-compatible translation endpoint. #### Moderations - [Create moderation](https://docs.dgrid.ai/api-reference/moderations/create-moderation.md): OpenAI-compatible content safety checks for user-generated or model-generated text. Evaluates input against categories such as hate, harassment, self-harm, sexual content, and violence. #### Models - [List models](https://docs.dgrid.ai/api-reference/models/list-models.md): Retrieve all models visible to the current API key. The result is permission-aware and scoped to the key's assigned access group. #### Usage & Billing - [Get request billing details](https://docs.dgrid.ai/api-reference/usage-and-billing/get-request-billing-details.md): Retrieve token usage, pricing, and USD cost details for a completed Model API request. #### Realtime - [Realtime](https://docs.dgrid.ai/ai-gateway/model-api/realtime.md): Build OpenAI-compatible Realtime API sessions on DGrid for low-latency text and audio conversations over WebSocket with streaming voice models. ### MANAGEMENT API - [Management API Keys](https://docs.dgrid.ai/management-api-keys.md): Create and manage Model API keys programmatically, and use your Management API Key to query account balances. - [Get account balance](https://docs.dgrid.ai/api-reference/management/get-account-balance.md): Retrieve total, subscription, and recharge balances for the account associated with your Management API Key. ### WEBHOOKS - [Webhook guide](https://docs.dgrid.ai/api-reference/webhooks/overview.md): Receive DGrid events with a custom HTTPS endpoint, verify signatures, and handle tests, retries, and duplicate deliveries. ### X402 API - [x402 API](https://docs.dgrid.ai/x402/overview.md): DGrid's x402 API lets developers pay per inference call using the x402 micropayment protocol — no API keys or accounts required. - [API Reference](https://docs.dgrid.ai/x402/api-reference.md): Endpoint reference for DGrid's x402 API, including request format, payment headers, response codes, and pay-per-inference billing details. ## OpenAPI Specs - [openapi](/api-reference/openapi.json) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Traditional Chinese (64 pages)](https://docs.dgrid.ai/_llms/zh-hant.txt): 文件, API 參考. - [Korean (64 pages)](https://docs.dgrid.ai/_llms/ko.txt): 문서, API 참조. - [French (64 pages)](https://docs.dgrid.ai/_llms/fr.txt): Documentation, Référence API. - [Spanish (64 pages)](https://docs.dgrid.ai/_llms/es.txt): Documentación, Referencia de la API. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.