Skip to content
Q3Qwen3.8 Playground

Qwen3.8 27B API

A Qwen3.8 27B API contract that is easy to ship and hard to misuse.

Use the familiar chat-completions shape while the Worker fixes the model, validates every boundary, enforces quotas, and keeps provider credentials off your client.

curl https://qwen3-8.org/v1/chat/completions \
  -H "Authorization: Bearer $QWEN38_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "messages": [
      {"role": "user", "content": "Explain the bug in this function..."}
    ],
    "max_tokens": 512,
    "temperature": 0.7
  }'

Request reference

The supported Qwen3.8 API fields are intentionally small.

Compatibility means the endpoint accepts the familiar chat completions shape. It does not mean every OpenAI field is accepted. Unknown fields are rejected so typos and unsupported options fail before they can create an unexpected provider request.

FieldAccepted valueDefaultNotes
modelqwen/qwen3.8-27bFixedOptional in the request; the Worker always pins this model.
messages1–32 messagesRequiredsystem, user, or assistant roles; non-empty text content only.
max_tokens1–1,024512Maximum generated tokens requested from the provider.
temperature0–20.7Lower values are usually more repeatable; test on your task.
streamfalsefalseStreaming responses are not supported by this endpoint.

All message content together is limited to 7,500 UTF-8 bytes, and the full JSON body must stay below 48,000 bytes. Text messages are supported; image input, tool definitions, unknown fields, and custom provider routing are outside this contract.

The fixed route also prevents a caller from silently switching to a cheaper or incompatible checkpoint. If your application needs model selection, expose an explicit allowlist in your own backend instead of forwarding arbitrary provider identifiers.

Keep keys server-side

The endpoint allows cross-origin requests for server and trusted client integrations, but that does not make a secret safe in shipped JavaScript. Route browser traffic through your own authenticated backend.

Save response evidence

Store the provider completion ID, model, token usage when present, your request ID, and the remaining-quota header. Those fields make a quality or billing report traceable.

Pin your test inputs

For meaningful comparisons, keep messages, temperature, maximum output, and application validation unchanged. A model update or prompt edit should become a new labeled test run.

Designed boundaries

The constraints are part of the product.

A smaller contract makes failures visible and spending predictable. If you need streaming, million-token requests, images, or custom provider routing, this endpoint is not the right fit yet.

7.5 KB

Combined UTF-8 message content

32

Messages per request

1,024

Maximum output tokens

60s

Provider timeout

Operational behavior

Retry with a boundary, not on every error.

A response includes a request ID for support and diagnostics. Successful calls also expose the remaining monthly call quota in x-ratelimit-remaining-requests.

400 / 413 / 415

Fix the request

Invalid JSON, unsupported content type, or an oversized body will fail again unchanged. Validate locally instead of retrying.

401

Replace or reactivate the key

The Bearer key is missing, malformed, revoked, or has no active plan. Never put a server API key in public browser code.

429

Wait or reduce traffic

The key crossed 60 calls per minute or the account reached its monthly quota. Queue work and cap retries so clients cannot create a retry storm.

502

Provider unavailable

A provider network or HTTP failure releases the reserved monthly call. A short, bounded exponential backoff is reasonable for idempotent application work.

Failure behavior

Errors tell you what boundary failed.

Every error includes a stable code, a safe message, and a request ID. Invalid input fails before calling the provider. A failed provider call releases its quota reservation.

{
  "error": {
    "code": "monthly_quota_exceeded",
    "message": "The Pro monthly quota has been reached."
  },
  "request_id": "..."
}

Ready to create a key?

Choose a plan, sign in by email, then generate a key in your dashboard.