无界 AI · 内测开放

Developer quickstart

Wujie AI provides an OpenAI-compatible Chat Completions API. Base URL: https://wujieai.fun/v1

中文English
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.
API context budget: 131072 tokens including input and output; maximum output: 16384. Website chat has separate, lower limits.
Early beta: a verified new account receives 1000 trial points. 100 points represent CNY 1 of trial allowance; points are not tokens or cash. Actual cash billing and online payments are not enabled. See pricing for the trial rates.
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://wujieai.fun/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://wujieai.fun/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.

OpenCode →