天翼云 API Playground

在线测试天翼云大模型接口

AI
你好,有什么可以帮你的?
就绪

调用示例

# 非流式
curl 'https://tianyi-proxy.aiwilddynasty.workers.dev/v1/chat/completions' \
  -H 'Authorization: Bearer YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"你好"}]}'

# 流式
curl 'https://tianyi-proxy.aiwilddynasty.workers.dev/v1/chat/completions' \
  -H 'Authorization: Bearer YOUR_KEY' \
  -d '{"model":"MODEL_ID","messages":[{"role":"user","content":"你好"}],"stream":true}'

参数说明

参数 类型 说明
modelString模型 ID(必填)
messagesArray对话消息(必填)
streamBoolean流式输出,默认 false
temperatureFloat温度 [0,2],默认 0.6
max_tokensInt最大长度,默认 16384
thinkingObject思考模式 {"type":"enabled"}