developers: one key, every way in
The deeprelay CLI, official Python and TypeScript SDKs, REST API, MCP server, and OpenAI-compatible inference. One API key unlocks all of it. Pick a tool below and make your first call in minutes.
curl -fsSL https://deeprelay.ai/install | shdeeprelay cli
One binary, no config file. Install it, log in once, and a streamed chat completion is a command in the shell you already have open.
Install
curl -fsSL https://deeprelay.ai/install | shFirst call
deeprelay models list --modality chatsdks
Both are generated from the same OpenAPI spec the API serves, so the client can't drift from the endpoint it calls.
# pip install deeprelay-sdk
import os
import deeprelay_sdk
cfg = deeprelay_sdk.Configuration(
host="https://api.deeprelay.ai/v1",
access_token=os.environ["DEEPRELAY_API_KEY"],
)
with deeprelay_sdk.ApiClient(cfg) as client:
models = deeprelay_sdk.InferenceApi(client).list_models(modality="chat")
for m in models.data:
print(f"{m.id:<36} {m.author or '-'}")// npm install @deeprelay/sdk
const { Configuration, InferenceApi } = require('@deeprelay/sdk');
async function main() {
const cfg = new Configuration({
basePath: 'https://api.deeprelay.ai/v1',
accessToken: process.env.DEEPRELAY_API_KEY,
});
const models = await new InferenceApi(cfg).listModels({ modality: 'chat' });
for (const m of models.data) {
console.log(`${m.id.padEnd(36)} ${m.author ?? '-'}`);
}
}
main();rest api
Plain HTTPS and JSON, with cursor pagination and idempotency keys on every mutation. The model catalog is your first call: one key-scoped GET.
curl https://api.deeprelay.ai/v1/models \
-H "Authorization: Bearer $DEEPRELAY_API_KEY"inference
Chat, images, and video speak the OpenAI wire format, so the client library you already import keeps working; swap two lines and you're billed per token instead of per hour.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.deeprelay.ai/v1",
api_key=os.environ["DEEPRELAY_API_KEY"], # never a literal key
)
stream = client.chat.completions.create(
model="deeprelay/deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Explain recursion in one sentence"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")mcp
Drop this into .mcp.json and your agent can read the catalog, check spend, manage webhooks, and run inference across chat, embeddings, image and video: 29 tools in three tiers.
{
"mcpServers": {
"deeprelay": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@deeprelay/mcp@latest"],
"env": {
"DEEPRELAY_API_KEY": "${DEEPRELAY_API_KEY}"
}
}
}
}Reads are free and unconfirmed. Writes take a single confirmation. Spending runs only inside a session budget you confirm first ($5 by default), no single call over $0.50 runs without its own confirmation, and the server stops at the budget until you approve more. The server enforces that, not the agent's good manners.
webhooks
Subscribe an HTTPS endpoint to the event types you care about. Every delivery is HMAC-signed and carries a stable event id you can dedupe on.
Subscribe
curl -X POST https://api.deeprelay.ai/v1/webhook-endpoints \
-H "Authorization: Bearer $DEEPRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/hooks/deeprelay",
"event_types":["video.completed","video.failed"]}'What you receive
{
"id": "dc062a1e…",
"type": "video.completed",
"created_at": "2026-08-07T02:39:11Z",
"data": {
"video": {
"id": "41ca1150…",
"object": "video",
"model": "deeprelay/wan2.7-t2v",
"status": "completed"
}
}
}v1 emits the video generation events, video.completed and video.failed, with the job nested under data.video as shown above. The webhooks guide lists every event type with its payload.
curl -fsSL https://deeprelay.ai/install | sh