deCloud
MA CHAIN · 20260131
01 / QUICKSTART

Quick start

  1. 01Connect a wallet and deposit MA (USDT on BSC is supported via the in-console cross-chain wizard)
  2. 02Create an API key in the console
  3. 03Call from any OpenAI-compatible SDK
02 / BASICS

Basics

FieldValue
Base URLhttps://macdecloud.com/v1
AuthAuthorization: Bearer dcld-sk-...
ProtocolOpenAI Chat Completions compatible
BillingMA deducted by token usage
03 / CURL

cURL example

curl https://macdecloud.com/v1/chat/completions \
  -H "Authorization: Bearer dcld-sk-..." \
  -d '{"model":"deepseek/deepseek-chat","messages":[{"role":"user","content":"Hello"}]}'
04 / STREAMING

Streaming

curl https://macdecloud.com/v1/chat/completions \
  -H "Authorization: Bearer dcld-sk-..." \
  -d '{"model":"deepseek/deepseek-chat","stream":true,"messages":[{"role":"user","content":"Hello"}]}'

Streaming responses are standard SSE; the final chunk carries usage.

05 / PYTHON

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://macdecloud.com/v1",
    api_key="dcld-sk-...",
)

# streaming
stream = client.chat.completions.create(
    model="deepseek/deepseek-v4-pro",
    messages=[{"role": "user", "content": "Hello"}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)
06 / NODE.JS

Node.js

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://macdecloud.com/v1",
  apiKey: "dcld-sk-...",
});

const stream = await client.chat.completions.create({
  model: "moonshotai/kimi-k3",
  messages: [{ role: "user", content: "Hello" }],
  stream: true,
});

for await (const chunk of stream) {
  const delta = chunk.choices[0]?.delta?.content;
  if (delta) process.stdout.write(delta);
}
07 / CATALOG

Model catalog

GET /v1/models returns available models and MA pricing; browse them on the model plaza.

08 / ERRORS

Error codes

StatusCodeDescription
401Invalid API key
402insufficient_balanceInsufficient balance — please deposit
403Forbidden or banned
404model_not_foundModel doesn't exist or isn't enabled
429rate_limit_exceededRate limited — see Retry-After
5xxUpstream or gateway error