WDCloud API Docs
WDCloud API provides a unified gateway for AI coding tools such as Claude Code, Codex, and Gemini CLI. Use one console to manage keys, quota, logs, and model access.
Unified endpointUse an OpenAI-compatible protocol for chat, image generation, and agent tools.
Metered billingCreate separate group tokens for each tool to make usage easier to audit.
Traceable logsReview model calls, cost, and failure reasons from the console.
Connection Details
| Item | Value |
|---|---|
| Console | https://token.wdcloud.ai |
| Base URL | https://token.wdcloud.ai |
| API Key | Create one in the console and copy the full sk-... token |
Key Management
Create separate keys for Claude Code, Codex, and Gemini CLI. This keeps usage accounting clear and lets you disable one tool without affecting the others.
Chat API Example
The following examples call /v1/chat/completions. Replace sk-xxxxxxxxxxxxxxxx with a token created in the console.
bash
curl https://token.wdcloud.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
-d '{
"model": "claude-sonnet-4-20250514",
"messages": [
{ "role": "user", "content": "Hello! Please introduce yourself." }
],
"stream": true
}'Image API Example
This example calls gpt-image-2 through /v1/images/generations.
bash
curl -X POST "https://token.wdcloud.ai/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
-d '{
"model": "gpt-image-2",
"prompt": "A futuristic city skyline at sunrise, realistic photography style."
}'Next Steps
- Use the sidebar to browse chat, image, and video docs.
- Set up Claude Code.
- Set up Codex.
- Set up Gemini CLI.
- Check FAQ when something fails.