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.
几分钟调通API
DeepSeek-V4-Pro
OpenAI
# 如果没有安装OpenAI Python SDK,可使用命令安装:pip install OpenAI from openai import OpenAI # 初始化客户端 client = OpenAI( base_url="https://www.autodl.art/api/v1", api_key="YOUR_API_KEY", ) # 调用接口(这里使用了stream=True进行流式响应) stream = client.chat.completions.create( model="DeepSeek-V4-Pro", messages=[ { "role": "user", "content": "您好!" } ], stream=True, ) # 流式打印输出 for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content)