bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 10쪽 중 7쪽
dsheets spread across tools
### 4. Structured, Shareable Evaluation
Dori produces clear, structured outputs that you can share and discuss with your team, such as:
* **Example outputs** from each candidate model
* **Qualitative notes** about behavior and suitability
* **Latency and performance metrics** observed during tests
* **Cost estimates** aligned to your expected traffic patterns and load
Instead of "gut-feel" and partial information, teams can rely on a traceable evaluation record when choosing "the best model for our use case."
### 5. Tight Integration with the AI Gateway
Dori is directly coupled with the AI Gateway, so everything you discover and test is immediately available to integrate in production via:
* **One API key**
* **One unified endpoint**
* **A single, coherent API interface**
Key consequences:
* You don't need separate auth, SDKs, or endpoints per provider
* A model you validate with Dori is ready to be used **without adding a new vendor integration**
* Changing models later becomes a **configuration change**, not a redevelopment project
## Typical Use Cases
### Multilingual Customer Support
* Need: Low-latency, cost-efficient LLM for a multilingual chatbot (e.g., English, Spanish, Portuguese)
* How Dori helps:
* Interprets multilingual and latency requirements
* Identifies models well-suited to conversational support across those languages
* Lets you test using real customer queries and conversation flows
### Code Assistants and Developer Tools
* Need: A model for code generation, explanation, and refactoring in languages like Python and TypeScript
* How Dori helps:
* Highlights models with strong reasoning and coding capabilities
* Emphasizes long-context support for large codebases
* Facilitates trials using real repositories, code snippets, or tasks
### Long-Context RAG and Document Applications
* Need: Stable performance for long-document retrieval-augmented generation (RAG) with 10k+ token contexts
* How Dori helps:
* Filters models by context length and RAG suitability
* Allows evaluation with your actual documents and retrieval setup
* Produces reports capturing both quality and performance under large contexts
## Benefits for Different User Types
### Individual Developers & Startup Teams
* Focus on product and UX rather than:
* Chasing vendor docs
* Wiring up multiple APIs and SDKs
* Iterate quickly:
* Try several models via Dori
* Lock in one (or more) via the Marketplace
* Swap later as new, better models arrive
### Enterprises & Large Platforms
* Standardize LLM access across business units using:
* A single integration with the LLM Marketplace
* Shared evaluation workflows via Dori
* Reduce long-term maintenance:
* Avoid bespoke integrations per vendor
* Maintain flexibility to adopt new models as the ecosystem evolves
### Web3 and On-Chain Projects
* Build AI-powered agents, dApps, and protocols whose model backbone can:
* Upgrade over time
* Diversify across providers
* Preserve on-chain and off-chain integration logic while:
* Changing or augmenting underlying LLMs via configuration
* Avoiding breaking changes every time you adopt a new model
# DGrid AI Documentation
Source: https://docs.dgrid.ai/index
Access 200+ leading AI models through DGrid's Web3-native gateway. Explore guides, the API reference, tokenomics, and the $DGAI economy.
<div>
<div>
<div>
<div>DGrid AI</div>
<div>The Decentralized<br />Smart Network of AI</div>
</div>
<div>
<a href="https://dgrid.ai/">
<button type="button">
Official Website
</button>
</a>
<a href="/what-we-do">
<button type="button">
What is DGrid AI?
</button>
</a>
<a href="/dgrid-solution">
<button type="button">
DGrid's Solution
</button>
</a>
</div>
</div>
<div>
<img alt="DGrid AI" />
</div>
</div>
<div>
<div>
<div>Explore the platform</div>
<p>
See the flagship products that make up the DGrid ecosystem.
</p>
<CardGroup>
<Card title="AI Gateway" href="https://dgrid.ai/ai-gateway">
One API for 200+ models with Web3-native payments and intelligent routing.
<div>
<span>200+ Models</span>
<span>OpenAI-compatible</span>
</div>
</Card>
<Card title="AI Arena" href="https://dgrid.ai/arena">
Blind model battles that turn community votes into routing intelligence.
<div>
<span>AI Battle</span>
<span>\$DGAI Points</span>
</div>
</Card>
<Card title="Model Marketplace" href="https://dgrid.ai/models">
The open catalog of 200+ models and providers behind DGrid AI Gateway, browsable and callable through one API.
<div>
<span>200+ Models</span>
<span>Open Catalog</span>
</div>
</Card>
</CardGroup>
</div>
<div>
<div>Build with DGrid</div>
<p>
Beyond the API — the economy, programs, and agent layer that power the DGrid ecosystem.
</p>
<Tabs>
<Tab title="$DGAI Economy">
<div>
<div>
<a href="/what-is-dgai">
<span>What is \$DGAI</span>
<span>The utility token behind value exchange, incentives, and governance</span>
</a>
<a href="/core-functions">
<span>Core Functions</span>
<span>Staking, payment, incentives, and governance — the four-dimensional engine of \$DGAI</span>
</a>
<a href="/circulation-mechanism">
<span>Circulation Mechanism</span>
<span>How \$DGAI flows between users, node operators, and the network</span>
</a>
<a href="/token-distribution">
<span>Token Distribution</span>
<span>How the 1 billion token supply is allocated across the ecosystem</span>
</a>
</div>
<div>
<img alt="$DGAI Economy" />
</div>
</div>
</Tab>
<Tab title="Genesis Premium">
<div>
<div>
<a href="/premium/program-overview">
<span>Program Overview</span>
<span>The Genesis Pass NFT: a credential for early participants in the DGrid network</span>
</a>
<a href="/premium/exclusive-benefits">
<span>Exclusive Benefits</span>
<span>Resource access, governance rights, and ecosystem dividends for members</span>
</a>
<a href="/premium/purchase-and-activation">
<span>Purchase & Activation</span>
<span>How to acquire and activate your Genesis Pass</span>
</a>
<a href="/premium/incentive-mechanism-and-rewards">
<span>Incentive Mechanism & Rewards</span>
<span>Earn \$DGAI and ecosystem rewards based on your contributions</span>
</a>
</div>
<div>
<img alt="Genesis Premium" />
</div>
</div>
</Tab>
<Tab title="DClaw">
<div>
<div>
<a href="/dclaw">
<span>What DClaw Does</span>
<span>One-click deployment for persistent, user-owned AI agents built on CoPaw</span>
</a>
<a href="/dclaw#why-dclaw-matters">
<span>Why DClaw Matters</span>
<span>Integrated DGrid API access, models, channels, memory, and skills in one workflow</span>
</a>
<a href="/dori">
<span>Dori Find Models</span>
<span>A natural-language advisor that picks the optimal model for every agent</span>
</a>
</div>
<div>
<img alt="DClaw" />
</div>
</div>
</Tab>
<Tab title="Staking">
<div>
<div>
<div>
<span>Coming Soon</span>
</div>
<a href="/core-functions">
<span>Staking and Access</span>
<span>Stake \$DGAI to gain network traffic, build reputation, and secure the network</span>
</a>
<a href="/core-functions">
<span>Node Operators</span>
<span>Tiered staking requirements based on node performance and reliability</span>
</a>
<a href="/what-is-dgai">
<span>\$DGAI Token</span>
<span>The token you'll stake — learn how it powers the DGrid economy today</span>
</a>
</div>
<div>
<img alt="Staking" />
</div>
</div>
</Tab>
</Tabs>
</div>
<div>
<div>Resources</div>
<Columns>
<Card title="Official Website" icon="globe" href="https://dgrid.ai/">
Explore the live platform at dgrid.ai
</Card>
<Card title="Follow on X" icon="twitter" href="https://x.com/dgrid_ai">
Product updates and announcements
</Card>
<Card title="Telegram Community" icon="send" href="https://telegram.me/dgrid_ai">
Get help and meet other builders
</Card>
</Columns>
</div>
</div>
# Management API Keys
Source: https://docs.dgrid.ai/management-api-keys
Programmatically create, rotate, list, and revoke DGrid Model API keys to manage the full lifecycle of credentials, scopes, and team access.
Management API Keys provide a programmatic way to manage the full lifecycle of Model API Keys. They are designed for enterprise teams, SaaS platforms, and automation systems that need to create, distribute, rotate, enable, disable, or revoke keys without relying on manual console operations.
Management API Keys are administrative credentials and are restricted to key management operations. They cannot be used to call model inference or completion endpoints.
## 1. Overview
Management API Keys are intended for scenarios such as:
* Issuing separate Model API Keys for different customers, projects, or environments
* Applying usage limits and automatic reset cycles to downstream Model API Keys
* Rotating, disabling, or revoking keys programmatically
* Enforcing least-privilege key management in SaaS, multi-tenant, and compliance-focused workflows
Core capabilities:
* Strict permission isolation for key management operations
* Full lifecycle automation for Model API Keys
* Configurable usage limits and reset cycles
* Designed for server-side services, internal tools, and automated provisioning workflows
## 2. API Surfaces and Authentication Boundaries
Key management is split into two API surfaces, each with its own authentication model:
| API Surface | Purpose | Authentication |
| --------------------------- | ------------------------------------------------ | ---------------------------------------- |
| `/v1/management-keys` | Manage Management API Keys | `JWT` |
| `/api/v1/model-router/keys` | Manage Model API Keys using a Management API Key | `Authorization: Bearer <management_key>` |
Important:
* A `Management API Key` can only be used with `/api/v1/model-router/keys`
* A `Management API Key` cannot be used with `/v1/management-keys`
* `/v1/management-keys` only supports `JWT` authentication
* The full secret is returned only once when a key is created and cannot be retrieved later
## 3. Basic Rules
* Each account can create up to `10` Management API Keys
* Management API Keys are enabled immediately after creation
* The full Management API Key secret is returned only once
* Subsequent list and detail responses return masked key values only
* Model API Keys are currently soft-deleted rather than permanently deleted
## 4. Base URL
The public API base URL is:
```text theme={null}
https://api.dgrid.ai
```
Route prefixes used in this document:
```text theme={null}
/v1/management-keys
/api/v1/model-router/keys
```
## 5. Create a Management API Key
Before using the Management API, first create a Management API Key in the DGrid console:
<Steps>
<Step title="Open the Management API Keys page" />
<Step title="Click Create" />
<Step title="Enter a key name" />
<Step title="Complete the required security verification" />
<Step title="Copy and securely store the key immediately after creation" />
</Steps>
<Note>
If you expose this flow in your own UI, clearly inform users that the secret is shown only once and should be stored immediately.
</Note>
## 6. Authentication
This document covers two authentication modes:
* Endpoints under `/v1/management-keys` require `JWT`
* Endpoints under `/api/v1/model-router/keys` require a Management API Key
Use the following header when calling `/api/v1/model-router/keys` endpoints:
```http theme={null}
Authorization: Bearer <management_key>
```
## 7. Management API Key Lifecycle Endpoints
These endpoints are used to create, view, update, enable, disable, and delete Management API Keys. All of them require `JWT` authentication.
| Operation | Method | Path | Notes |
| ---------------------- | -------- | -------------------------------------- | ------------------------------------ |
| Create management key | `POST` | `/v1/management-keys` | Returns the full key only once |
| List management keys | `GET` | `/v1/management-keys` | Supports pagination |
| Update management key | `PUT` | `/v1/management-keys/{id}` | Currently only `name` can be updated |
| Delete management key | `DELETE` | `/v1/management-keys/{id}` | Soft delete |
| Enable management key | `POST` | `/v1/management-keys/{id}/enablement` | Takes effect immediately |
| Disable management key | `POST` | `/v1/management-keys/{id}/disablement` | Takes effect immediately |
Example create response:
```json theme={null}
{
"code": 200,
"message": "ok",
"data": {
"id": "3ecf9d8d-9b8f-4df6-9d30-7a693e1f0d1c",
"name": "prod-admin",
"key": "mk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"keyPreview": "mk-x************************xxxx5",
"createdAt": "2026-04-23T10:00:00Z",
"status": "Enabled",
"enabled": true
}
}
```
Notes:
* `key` is returned only once at creation time
* `keyPreview` is the masked display value
## 8. Manage Model API Keys with a Management API Key
All endpoints in this section use:
```http theme={null}
Authorization: Bearer <management_key>
```
### 8.1 Request Fields
The current implementation supports the following fields when creating or updating a Model API Key:
| Field | Type | Required | Description |
| ----------- | ---------------------------- | ------------------ | --------------------------- |
| `name` | `string` | Required on create | Key name |
| `limit` | `number` | No | Usage limit |
| `cycle` | `daily \| weekly \| monthly` | No | Reset cycle for the limit |
| `expiredAt` | `string` | No | Expiration timestamp in UTC |
| `groupId` | `string` | No | Group ID |
Notes:
* If you are familiar with OpenRouter's `limit_reset`, the closest equivalent in the current DGrid implementation is `cycle`
* `expiredAt` should use an ISO 8601 UTC timestamp such as `2026-12-31T23:59:59Z`
### 8.2 List Keys
* Method: `GET`
* Path: `/api/v1/model-router/keys`
* Query parameters:
* `page`: page number, default `1`
* `size`: page size, default `20`, maximum `100`
Implementation notes:
* Pagination uses `page` and `size`, not `limit` and `offset`
* Partial name search is not currently supported
* `disabled` filtering is not currently supported
Request example:
```bash theme={null}
curl "https://api.dgrid.ai/api/v1/model-router/keys?page=1&size=20" \
-H "Authorization: Bearer <management_key>"
```
Response example:
```json theme={null}
{
"code": 200,
"message": "ok",
"data": {
"total": 2,
"page": 1,
"items": [
{
"id": "e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111",
"name": "prod-key",
"key": "sk-a************************f9x2d",
"limit": 1000,
"usageInCycle": 12.34,
"usageInTotal": 98.76,
"enabled": true,
"cycle": "monthly",
"expiredAt": "2026-12-31T23:59:59Z",
"groupId": null,
"groupName": ""
}
]
}
}
```
Field notes:
* `key`: masked API key value
* `usageInCycle`: usage within the current cycle
* `usageInTotal`: cumulative usage
* `enabled`: current enabled state
* `groupName`: group name
### 8.3 Create a Model API Key
* Method: `POST`
* Path: `/api/v1/model-router/keys`
Request example:
```bash theme={null}
curl -X POST "https://api.dgrid.ai/api/v1/model-router/keys" \
-H "Authorization: Bearer <management_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-key",
"limit": 1000,
"cycle": "monthly",
"expiredAt": "2026-12-31T23:59:59Z"
}'
```
Request body example:
```json theme={null}
{
"name": "prod-key",
"limit": 1000,
"cycle": "monthly",
"expiredAt": "2026-12-31T23:59:59Z"
}
```
Response example:
```json theme={null}
{
"code": 200,
"message": "ok",
"data": {
"id": "e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111",
"key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
```
Notes:
* `key` is the full API key value and is returned only once
* Store it immediately in a secure secrets management system
### 8.4 Get Key Details
* Method: `GET`
* Path: `/api/v1/model-router/keys/{id}`
Implementation note:
* The current implementation uses `id (UUID)`, not `key_hash`
Request example:
```bash theme={null}
curl "https://api.dgrid.ai/api/v1/model-router/keys/e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111" \
-H "Authorization: Bearer <management_key>"
```
Response example:
```json theme={null}
{
"code": 200,
"message": "ok",
"data": {
"id": "e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111",
"name": "prod-key",
"key": "sk-a************************f9x2d",
"limit": 1000,
"usageInCycle": 12.34,
"usageInTotal": 98.76,
"enabled": true,
"cycle": "monthly",
"expiredAt": "2026-12-31T23:59:59Z",
"groupId": null,
"groupName": ""
}
}
```
### 8.5 Update a Model API Key
* Method: `PUT`
* Path: `/api/v1/model-router/keys/{id}`
Currently supported update fields:
* `name`
* `limit`
* `cycle`
* `groupId`
Request example:
```bash theme={null}
curl -X PUT "https://api.dgrid.ai/api/v1/model-router/keys/e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111" \
-H "Authorization: Bearer <management_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-key-v2",
"limit": 2000,
"cycle": "monthly"
}'
```
Request body example:
```json theme={null}
{
"name": "prod-key-v2",
"limit": 2000,
"cycle": "monthly"
}
```
Implementation note:
* The current update method is `PUT`, not `PATCH`
### 8.6 Disable a Model API Key
* Method: `POST`
* Path: `/api/v1/model-router/keys/{id}/disablement`
Request example:
```bash theme={null}
curl -X POST "https://api.dgrid.ai/api/v1/model-router/keys/e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111/disablement" \
-H "Authorization: Bearer <management_key>"
```
After it is disabled, the API key can no longer be used for model calls.
### 8.7 Enable a Model API Key
* Method: `POST`
* Path: `/api/v1/model-router/keys/{id}/enablement`
Request example:
```bash theme={null}
curl -X POST "https://api.dgrid.ai/api/v1/model-router/keys/e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111/enablement" \
-H "Authorization: Bearer <management_key>"
```
### 8.8 Delete a Model API Key
* Method: `DELETE`
* Path: `/api/v1/model-router/keys/{id}`
Request example:
```bash theme={null}
curl -X DELETE "https://api.dgrid.ai/api/v1/model-router/keys/e8f9c547-4f0c-4d8b-8e1b-8ef9b0aa1111" \
-H "Authorization: Bearer <management_key>"
```
Implementation note:
* Deletion is currently a soft delete rather than a physical delete
## 9. Example Usage
<CodeGroup>
```python Python theme={null}
import requests
BASE = "https://api.dgrid.ai/api/v1/model-router"
MANAGEMENT_KEY = "mk-your-management-key"
headers = {
"Authorization": f"Bearer {MANAGEMENT_KEY}",
"Content-Type": "application/json"
}
# 1) List keys
resp = requests.get(
f"{BASE}/keys",
headers=headers,
params={"page": 1, "size": 20}
)
print("LIST:", resp.json())
# 2) Create key
resp = requests.post(
f"{BASE}/keys",
headers=headers,
json={
"name": "prod-key",
"limit": 1000,
"cycle": "monthly",
"expiredAt": "2026-12-31T23:59:59Z"
}
)
create_data = resp.json()
print("CREATE:", create_data)
key_id = create_data["data"]["id"]
# 3) Get key
resp = requests.get(f"{BASE}/keys/{key_id}", headers=headers)
print("GET:", resp.json())
# 4) Update key
resp = requests.put(
f"{BASE}/keys/{key_id}",
headers=headers,
json={
"name": "prod-key-v2",
"limit": 2000,
"cycle": "monthly"
}
)
print("UPDATE:", resp.json())
# 5) Disable key
resp = requests.post(f"{BASE}/keys/{key_id}/disablement", headers=headers)
print("DISABLE:", resp.json())
# 6) Enable key
resp = requests.post(f"{BASE}/keys/{key_id}/enablement", headers=headers)
print("ENABLE:", resp.json())
# 7) Delete key
resp = requests.delete(f"{BASE}/keys/{key_id}", headers=headers)
print("DELETE:", resp.json())
```
```typescript TypeScript theme={null}
const BASE = "https://api.dgrid.ai/api/v1/model-router";
const MANAGEMENT_KEY = "mk-your-management-key";
const headers: HeadersInit = {
Authorization: `Bearer ${MANAGEMENT_KEY}`,
"Content-Type": "application/json",
};
async function main() {
const listResp = await fetch(`${BASE}/keys?page=1&size=20`, {
method: "GET",
headers,
});
console.log("LIST:", await listResp.json());
const createResp 프로젝트로 돌아가기