Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
提交第一个生成任务,轮询到完成,然后下载结果。
export WIDEROUTER_API_KEY="sk-your-api-key"
curl https://api.widerouter.com/v1/tasks \ -H "Authorization: Bearer $WIDEROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "your-model-id", "prompt": "黄昏时分的灯塔" }'
import os, requests resp = requests.post( "https://api.widerouter.com/v1/tasks", headers={"Authorization": f"Bearer {os.environ['WIDEROUTER_API_KEY']}"}, json={"model": "your-model-id", "prompt": "黄昏时分的灯塔"}, timeout=30, ) task_id = resp.json()["id"]