Mallard AI

Quick Start

Make your first request to Qwen3.6 35B A3B from any OpenAI-compatible client.

  1. 1 Create an API key

    Create an account, then an API key on your account page. It's shown once, so copy it then. It works within a minute.

    The examples read the key from an environment variable:

    export MALLARD_API_KEY="your key"
  2. 2 Set the base URL

    Base URL
    https://api.mallardai.co.uk/v1
    Model ID
    qwen/qwen3.6-35b-a3b
  3. 3 Make your first request

    curl

    curl https://api.mallardai.co.uk/v1/chat/completions \
      -H "Authorization: Bearer $MALLARD_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "qwen/qwen3.6-35b-a3b",
        "messages": [{"role": "user", "content": "What is the capital of Wales?"}]
      }'

    Python

    JavaScript

Going further

Streaming

Set stream to true.

Python
stream = client.chat.completions.create(
    model="qwen/qwen3.6-35b-a3b",
    messages=[{"role": "user", "content": "Name three Welsh castles."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

The last chunk carries the usage, with an empty choices list. While a long prompt is read, the stream sends : keep-alive comment lines, which clients skip.

Reasoning

Reasoning is on by default, and counts as output. The message carries it in reasoning, and the answer in content. When streaming, it's in delta.reasoning.

To switch it off, send one of these:

  • "reasoning": {"enabled": false}
  • "reasoning_effort": "none"
  • "chat_template_kwargs": {"enable_thinking": false}
Python
response = client.chat.completions.create(
    model="qwen/qwen3.6-35b-a3b",
    messages=[{"role": "user", "content": "What is the capital of Wales?"}],
    extra_body={"reasoning": {"enabled": False}},
)

Images

Send up to 4 images per request as image_url parts, each a link or a data: URL. A linked image can be up to 10 MB, at a public address on port 80 or 443.

curl
curl https://api.mallardai.co.uk/v1/chat/completions \
  -H "Authorization: Bearer $MALLARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.6-35b-a3b",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe this image in one sentence."},
        {"type": "image_url", "image_url": {"url": "https://mallardai.co.uk/mallard-share.png"}}
      ]
    }]
  }'

Errors

StatusMeaning
400Invalid JSON, an image that couldn't be fetched, n or best_of above 1, prompt_logprobs, or a prompt plus max_tokens over 262,144 tokens.
401The API key is missing, wrong or revoked.
402Your prepaid balance has run out. Top up on your account page.
404Unknown model ID. Use qwen/qwen3.6-35b-a3b.
429Your API key is at its limit of concurrent requests. Retry after 30 seconds.
500A fault on our side. Email us if it keeps happening.
503The model is busy or down and no capacity came free within 5 minutes, or the API is starting up. Retry shortly. A streamed request gets this as an error event.

Errors come as {"error": {"message": …, "type": …}}. A 402's type is insufficient_quota.

Next steps