一步API中文文档
  1. chat格式
一步API中文文档
  • 01_人工客服
  • 02_一步API福利群
  • 03_一步镜像站-福利群
  • 04_购买地址
  • 05_base_url说明
  • 06_API key的获取和使用
  • 07_支持的模型与在线查询
  • 08_API Key余额查询
  • 09_常用工具配置教程
    • 01 Chatbox 配置一步API
    • 02 PyCharm 配置一步API
    • 03 Cursor 配置一步API
    • 04 Trae AI 配置一步API
    • 05 CherryStudio 配置一步API
    • 06 Dify 配置一步API
    • 07 AingDesk 配置一步API
    • 08 VS Code 配置一步API
    • 09 IntelliJ IDEA 配置一步API
    • 10 immersivetranslate 沉浸式翻译配置一步API
    • 11 Zed 配置一步API
    • 12 DeepChat 配置一步API
    • 13 Void 配置一步API
    • 14 LibreChat 配置一步API
    • 15 Sider 配置一步API
    • 16 NextChat 配置一步API
    • 17 ChatWise 配置一步API
    • 18 Glarity 配置一步API
    • 19 Tavo 配置一步API
    • 20 OMate Chat 配置一步API
    • 21 Claude Code 配置一步API
    • 22 91写作配置
  • 010_示例代码
    • python
      • 01 OpenAI-Python示例代码
      • 02 Claude-Python示例代码
      • 03 OpenAI-image-Python示例代码
      • 04 Gemini-Python示例代码
      • 05 Gemini多场景-Python代码示例
      • 06 Rerank-python示例代码
      • 07 Python分析文件代码示例
      • 08 whisper-1-Python实力代码
      • 09 dalle-3-Python示例代码
      • 10 doubao-Python示例代码
      • 11 gemini-image-Python示例代码
      • 12 gpt-image-1-Python示例代码
      • 13 sora-2-Python代码示例
      • 14_Pro/BAAI/bge-reranker-v2-m3-Python示例代码
      • 15 Python其他示例
    • Java
      • 01 OpenAI-Java示例代码
      • 02 Claude-Java示例代码
      • 03 Gemini多场景-Java代码示例
  • 聊天接口(Chat)
    • 图片识别接口
    • 聊天接口(通用)
  • 向量生成(Embeddings)
    • 创建嵌入
  • 文生图片(Images)
    • DALL·E
  • 音频(Audio)
    • TTS文本转语音
    • ASR语音转文本
  • 视频模型
    • veo 视频生成
      • OpenAI 视频格式
        • openai 创建视频,带图片
        • openai 查询任务
        • openai 下载视频
    • Kling 快手可灵
      • Callback协议
      • 图像生成
      • 文生视频
      • 图生视频
      • 查询任务(免费)
      • 多图参考生视频
      • 虚拟试穿
      • 视频延长
      • 视频特效
    • sora 视频生成
      • chat格式
        • 创建视频
          POST
        • 创建视频, 带图片
          POST
        • 连续修改生成视频
          POST
      • OpenAI官方视频格式
        • openai 查询任务
        • openai 下载视频
        • openai 创建视频,带图片
        • openai 创建视频,带图片 私有模式
        • openai 创建视频(带Character)
        • openai 编辑视频
  • 更新中
    • API的介绍及使用教程点击内涵链接
    • 常用教程合集
    • Anthropic Claude接口
    • Claude账号登录教程
  • 接口
    • Anthropic 对话格式(Messages)
    • Cohere 重排序格式(Rerank)
    • Deepseek reasoning 对话格式(类Chat Completions)
    • Jina AI 重排序格式(Rerank)
    • Midjourney 图像格式(Midjourney Proxy/Midjourney Proxy Plus)
    • OpenAI 音频格式
    • OpenAI 对话格式(Chat Completions)
    • OpenAI 嵌入格式(Embeddings)
    • OpenAI 图像格式(Image)
    • OpenAI 实时对话接口
    • OpenAI 响应格式(Responses)
    • Suno 音乐格式(Music)
    • Xinference 重排序格式(Rerank)
  1. chat格式

创建视频

POST
https://yibuapi.com/v1/chat/completions
给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成
官方文档:https://platform.openai.com/docs/api-reference/chat/create

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数

Body 参数application/json

示例
{
  "model": "sora-2",
  "max_tokens": 1000,
  "messages": [
    {
      "role": "user",
      "content": "an astronaut golden retriever named Sora levitates around an intergalactic pup-themed space station with a tiny jet back that propels him. gorgeous specular lighting and comets fly through the sky, retro-future astro-themed music plays in the background. light glimmers off the dog's eyes. the dog initially propels towards the space station with the doors opening to let him in. the shot then changes. now inside the space station, many tennis balls are flying around in zero gravity. the dog's astronaut helmet opens up so he can grab one. 35mm film, the intricate details and texturing of the dog's hair are clearly visible and the light of the comets shimmers off the fur."
    }
  ],
  "stream": true
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://yibuapi.com/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "sora-2",
  "max_tokens": 1000,
  "messages": [
    {
      "role": "user",
      "content": "an astronaut golden retriever named Sora levitates around an intergalactic pup-themed space station with a tiny jet back that propels him. gorgeous specular lighting and comets fly through the sky, retro-future astro-themed music plays in the background. light glimmers off the dog'\''s eyes. the dog initially propels towards the space station with the doors opening to let him in. the shot then changes. now inside the space station, many tennis balls are flying around in zero gravity. the dog'\''s astronaut helmet opens up so he can grab one. 35mm film, the intricate details and texturing of the dog'\''s hair are clearly visible and the light of the comets shimmers off the fur."
    }
  ],
  "stream": true
}'

返回响应

🟢200OK
application/json
Body

示例
{
    "id": "chatcmpl-123",
    "object": "chat.completion",
    "created": 1677652288,
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "\n\nHello there, how may I assist you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 9,
        "completion_tokens": 12,
        "total_tokens": 21
    }
}
修改于 2025-11-10 15:45:31
上一页
视频特效
下一页
创建视频, 带图片
Built with