DocsAPI reference

OpenAPI specification

Model IDs and options in examples are illustrative. Select an available model from GET /v1/models and check its capabilities and current prices.

POST /v1/messages

Anthropic Messages API format. Translated internally to chat completions. Send the key as x-api-key or as a Bearer token; anthropic-version is accepted and not required.

ParameterTypeDefaultDescription
modelstringrequiredModel ID
messagesarrayrequiredArray of {role, content} objects
max_tokensintegerrequiredMaximum tokens to generate
systemstring—System prompt
streambooleanfalseEnable SSE streaming

Example

curl -X POST https://ark.dewaweb.com/v1/messages \
  -H "Authorization: Bearer ark_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "alibaba/qwen3.8-flash",
    "max_tokens": 1024,
    "system": "You are a coding assistant.",
    "messages": [
      {"role": "user", "content": "Write fizzbuzz in Python."}
    ]
  }'