Developer quickstart
Wujie AI provides an OpenAI-compatible Chat Completions API. Base URL: https://wujie.run/v1
Sign up with email verification, then create a personal key in the API dashboard. Keys expire; rotate them before the expiry shown there.
Model ID: wujie-128k. Text, streaming and tool calls are supported. Image and video generation are not available.
Usage is metered from reported tokens. Interrupted requests with unknown usage retain a reservation pending review. No production uptime commitment is offered.
cURL · Chat Completions
curl https://wujie.run/v1/chat/completions \
-H "Authorization: Bearer $WUJIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"wujie-128k","messages":[{"role":"user","content":"Hello"}],"stream":true,"stream_options":{"include_usage":true},"max_tokens":2048}'Set WUJIE_API_KEY locally. The cURL example uses a POSIX shell. Stream chunks end with [DONE]; usage includes input and output tokens. Never automatically retry a billable request after a connection failure.
Python · OpenAI-compatible SDK
import os
from openai import OpenAI
client = OpenAI(base_url="https://wujie.run/v1", api_key=os.environ["WUJIE_API_KEY"], max_retries=0)
stream = client.chat.completions.create(
model="wujie-128k",
messages=[{"role": "user", "content": "Hello"}],
max_tokens=2048, stream=True, stream_options={"include_usage": True},
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)401:invalid or expired key · 402:insufficient allowance · 429:rate, quota or queue limit; read error.code · 502/504:upstream service unavailable。Keep X-Request-ID for diagnostics, never share your key.