Base URL: https://dcdncloud.com/api/v1/gpu
All endpoints require Authorization: Bearer YOUR_TOKEN unless noted.
| Method | Endpoint | Description |
|---|---|---|
| POST | /inference | Run inference (completion) |
| POST | /inference/stream | Streaming inference (SSE) |
| POST | /inference/batch | Batch inference (multiple prompts) |
| POST | /inference/billed | Billed inference (token-metered) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /models | List all available models |
| GET | /models/{model_id} | Get model details |
| GET | /models/{model_id}/providers | List providers for a model |
| GET | /agent/models | Models available for agents |
| Method | Endpoint | Description |
|---|---|---|
| GET | /nodes | List GPU nodes |
| GET | /nodes/{node_id} | Node details + hardware specs |
| GET | /nodes/{node_id}/monitoring | Live GPU/CPU/RAM metrics |
| GET | /stats | Marketplace-wide statistics |
| Method | Endpoint | Description |
|---|---|---|
| POST | /training/create | Create training job |
| GET | /training/jobs | List training jobs |
| GET | /training/jobs/{id} | Get job details |
| DELETE | /training/jobs/{id} | Cancel training job |
| Method | Endpoint | Description |
|---|---|---|
| POST | /rent | Rent a GPU node |
| GET | /rentals | List active rentals |
| DELETE | /rentals/{id} | Cancel rental |
Run a single completion. OpenAI-compatible format.
curl -X POST https://dcdncloud.com/api/v1/gpu/inference \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "dcdn-smart",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is DCDN Cloud?"}
],
"max_tokens": 500,
"temperature": 0.7
}'
Response:
{
"id": "inf-abc123",
"model": "dcdn-smart",
"choices": [{
"message": {"role": "assistant", "content": "DCDN Cloud is a..."},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 25, "completion_tokens": 150, "total_tokens": 175}
}
Streaming inference via Server-Sent Events (SSE).
curl -X POST https://dcdncloud.com/api/v1/gpu/inference/stream \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "dcdn-fast",
"messages": [{"role": "user", "content": "Write a haiku"}],
"stream": true
}'
Response is a stream of data: {...} SSE events, terminated by data: [DONE].
Send multiple prompts in one request.
curl -X POST https://dcdncloud.com/api/v1/gpu/inference/batch \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "dcdn-smart",
"prompts": ["Translate: Hello", "Summarize: quantum computing"],
"max_tokens": 200
}'
List all available models with pricing.
curl https://dcdncloud.com/api/v1/gpu/models \ -H "Authorization: Bearer TOKEN"
Response includes: model name, provider, context window, input/output pricing per 1M tokens.
Marketplace statistics: total nodes, models, inferences, avg latency, revenue.
curl https://dcdncloud.com/api/v1/gpu/stats \ -H "Authorization: Bearer TOKEN"
Create a new fine-tuning job.
{
"model": "meta-llama/Llama-3-8B",
"dataset_url": "https://example.com/train.jsonl",
"epochs": 3,
"learning_rate": 2e-5,
"batch_size": 4
}
List all your training jobs with status, progress, and metrics.
Cancel a running or queued training job.
Rent a GPU node by the hour.
{
"node_id": "DCDN-SA-c47e",
"hours": 4
}
Price is set by the node operator. Revenue split: 70% operator / 25% platform / 5% treasury.
List your active GPU rentals with time remaining and billing info.
Cancel an active rental. Unused time may be refunded per the cancellation policy.
For full OpenAI SDK compatibility, use the /v1/chat/completions endpoint:
curl https://dcdncloud.com/v1/chat/completions \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "dcdn-smart",
"messages": [{"role": "user", "content": "Hello"}]
}'
This route is also available at /api/v1/openai/v1/chat/completions.
All requests require a Bearer token from the DCDN Cloud dashboard. Alternatively, AI agents can use x402 payments (USDC on Base) for per-request access without an API key.