### LLM API Successful Video Generation Response Example Source: https://6ibmqmipvf.apifox.cn/368663635e0 Demonstrates a successful response from the LLM API after video generation. It confirms successful parsing and lists the total number of video drafts found, along with details for each generated video, including various path URLs. ```yaml id: chatcmpl-drafts-1761731293 object: chat.completion total: 7 created: 1761731295 model: sora-drafts-url choices: - finish_reason: stop index: 0 message: content: | ✅ 解析成功 📹 共找到 7 个视频草稿 role: assistant data: - id: task_01k87x66vpe45t1tb73cmdjf4t prompt: 一只猫在开飞机 videos: - mp3_path: >- https://videos1.ss2.life/az/files/6e0608f9c4dd6f1_00000000-0614-6283-9b29-2d01d66eca30%2Fdrvs%2Fmp3%2Fraw?se=2025-11-04T09%3A44%3A27Z&sp=r&sv=2024-08-04&sr=b&skoid=1af02b11-169c-463d-b441-d2ccfc9f02c8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-29T04%3A56%3A17Z&ske=2025-11-05T05%3A01%3A17Z&sks=b&skv=2024-08-04&sig=ITFkwDefJ4QBqoR0/JU0S47ApSpgyHXYfUTva0F%2BWAo%3D&ac=oaisdsorprwestus2 source_path: >- https://videos1.ss2.life/az/files/00000000-0614-6283-9b29-2d01d66eca30%2Fraw?se=2025-11-04T09%3A44%3A27Z&sp=r&sv=2024-08-04&sr=b&skoid=1af02b11-169c-463d-b441-d2ccfc9f02c8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-29T04%3A56%3A17Z&ske=2025-11-05T05%3A01%3A17Z&sks=b&skv=2024-08-04&sig=VlCH9GbGUzuEhH3CHn6KCWTASteJDXYudeMihfwcutw%3D&ac=oaisdsorprwestus2 md_path: >- https://videos1.ss2.life/az/files/e5790f2c16a8275_00000000-0614-6283-9b29-2d01d66eca30%2Fdrvs%2Fmd%2Fraw?se=2025-11-04T09%3A44%3A27Z&sp=r&sv=2024-08-04&sr=b&skoid=1af02b11-169c-463d-b441-d2ccfc9f02c8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-29T04%3A56%3A17Z&ske=2025-11-05T05%3A01%3A17Z&sks=b&skv=2024-08-04&sig=asYd7sT0Xt%2BNO/ky6Kvttn%2Bgc%2BN0dpCCUvcP9uhXw6Q%3D&ac=oaisdsorprwestus2 thumbnail_path: >- https://videos1.ss2.life/az/files/b0f2e63e1f971e8_00000000-0614-6283-9b29-2d01d66eca30%2Fdrvs%2Fthumbnail%2Fraw?se=2025-11-04T09%3A44%3A27Z&sp=r&sv=2024-08-04&sr=b&skoid=1af02b11-169c-463d-b441-d2ccfc9f02c8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-29T04%3A56%3A17Z&ske=2025-11-05T05%3A01%3A17Z&sks=b&skv=2024-08-04&sig=/orrOnsVj2JuaLSB4wfjzj0oJP8NyGOuIT9iYHH5%2BrA%3D&ac=oaisdsorprwestus2 gif_path: >- https://videos1.ss2.life/az/files/6899301acbf58c3_00000000-0614-6283-9b29-2d01d66eca30%2Fdrvs%2Fgif%2Fraw?se=2025-11-04T09%3A44%3A27Z&sp=r&sv=2024-08-04&sr=b&skoid=1af02b11-169c-463d-b441-d2ccfc9f02c8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-29T04%3A56%3A17Z&ske=2025-11-05T05%3A01%3A17Z&sks=b&skv=2024-08-04&sig=h4VfTRtCYreFI6ikGnHcVaRjFRuo4/PK2HE0fKZs4xs%3D&ac=oaisdsorprwestus2 - id: task_01k7jwwh01er9bznjzwjmmv0z0 prompt: 一群大妈在骂架 videos: - mp3_path: >- https://videos1.ss2.life/az/vg-assets/assets%2Ftask_01k7jwwh01er9bznjzwjmmv0z0%2Ftask_01k7jwwh01er9bznjzwjmmv0z0_genid_448bc7f7-1860-484e-9e91-d2668df37cf7_25_10_15_03_01_193835%2Fvideos%2F00000%2Faudio.mp3?se=2025-11-04T09%3A44%3A27Z&sp=r&sv=2024-08-04&sr=b&skoid=1af02b11-169c-463d-b441-d2ccfc9f02c8&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-29T04%3A56%3A18Z&ske=2025-11-05T05%3A01%3A18Z&sks=b&skv=2024-08-04&sig=K781p95wwrL79yxB6sxuMLc9bdo4RFrIQoe1ay4rYyU%3D&ac=oaivgprodscus source_path: >- ``` -------------------------------- ### LLM API Error Response Example Source: https://6ibmqmipvf.apifox.cn/368663635e0 Illustrates a typical error response from the LLM API, indicating a failure in parsing due to an invalid or expired accessToken. This example is useful for debugging authentication issues. ```yaml id: chatcmpl-drafts-1761731454 object: chat.completion created: 1761731454 model: sora-drafts-url choices: - finish_reason: stop index: 0 message: content: "❌ 解析失败:accessToken 无效或已过期" role: assistant usage: completion_tokens: 49 total_tokens: 93 prompt_tokens: 44 ``` -------------------------------- ### GET /v1/videos/video_e5d4e72b-20a9-497d-94cb-7f5ce31d7f17/content Source: https://6ibmqmipvf.apifox.cn/363035883e0 Retrieves the content of a specific Sora2 video. This endpoint is noted to be slow and is generally recommended for backend use, with direct URL fetching being the preferred method for users. ```APIDOC ## GET /v1/videos/{video_id}/content ### Description Retrieves the content of a specific Sora2 video. This endpoint is noted to be slow and is generally recommended for backend use, with direct URL fetching being the preferred method for users. Please note the generation task ID. ### Method GET ### Endpoint /v1/videos/video_e5d4e72b-20a9-497d-94cb-7f5ce31d7f17/content ### Parameters #### Header Parameters - **Authorization** (string) - Optional - Used for authentication. - **Accept** (string) - Optional - Specifies the desired response format, defaults to application/json. - **Content-Type** (string) - Optional - Specifies the request content type, defaults to application/json. ### Request Example ``` GET /v1/videos/video_e5d4e72b-20a9-497d-94cb-7f5ce31d7f17/content Host: prod-cn.your-api-server.com Authorization: Bearer {{YOUR_API_KEY}} Accept: application/json Content-Type: application/json ``` ### Response #### Success Response (200) - **(object)** - An empty JSON object is returned on success, indicating the request was processed. Specific content details would typically be in the response body or via a URL. #### Response Example ```json { } ``` ``` -------------------------------- ### GET /v1/videos/{video_id} Source: https://6ibmqmipvf.apifox.cn/363035225e0 Retrieves the progress and status of a Sora2 video generation task. You can track the task using the 'status' or 'progress' fields. Upon completion, a 'video_url' will be provided for downloading the generated video. ```APIDOC ## GET /v1/videos/{video_id} ### Description Retrieves the progress and status of a Sora2 video generation task. This endpoint is essential for asynchronous operations, allowing you to check if a task is pending, processing, or has successfully completed. Once completed, a direct download URL for the generated video is provided. ### Method GET ### Endpoint /v1/videos/{video_id} ### Parameters #### Path Parameters - **video_id** (string) - Required - The unique identifier of the video generation task. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **id** (string) - The unique identifier of the task. - **size** (string) - The resolution or size of the generated video (e.g., "720x720"). - **model** (string) - The model used for generation (e.g., "sora2"). - **object** (string) - The type of object returned (e.g., "video"). - **status** (string) - The current status of the task (e.g., "pending", "processing", "completed"). - **progress** (integer) - The completion progress of the task in percentage (0-100). - **video_url** (string) - The URL to download the generated video. This field is populated only when the status is "completed". - **created_at** (integer) - Timestamp indicating when the task was created. - **completed_at** (integer) - Timestamp indicating when the task was completed. #### Response Example ```json { "id": "video_c916cb42-8a53-480c-a8e5-62f9cf962bfd", "size": "720x720", "model": "sora2", "object": "video", "status": "completed", "progress": 100, "video_url": "https://videos.openai.com/az/files/00000000-67e8-6284-b662-49e32684ad2b%2Fraw?se=2025-10-27T07%3A09%3A51Z&sp=r&sv=2024-08-04&sr=b&skoid=cfbc986b-d2bc-4088-8b71-4f962129715b&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-10-21T06%3A55%3A06Z&ske=2025-10-28T07%3A00%3A06Z&sks=b&skv=2024-08-04&sig=MkkDGFvmW8CBMEMQn4%2BvgyzZi4WsNdlXhiVCECZT8xo%3D&ac=oaisdsorprcentralus", "created_at": 1761030457, "completed_at": 1761030590 } ``` ``` -------------------------------- ### POST /llmstxt/6ibmqmipvf_apifox_cn_llms_txt Source: https://6ibmqmipvf.apifox.cn/363752684e0 Generates a video based on the provided prompt and returns the video details or an error message. ```APIDOC ## POST /llmstxt/6ibmqmipvf_apifox_cn_llms_txt ### Description This endpoint generates a video from a given text prompt and returns either the video details upon success or an error message if the parsing fails. ### Method POST ### Endpoint /llmstxt/6ibmqmipvf_apifox_cn_llms_txt ### Parameters #### Query Parameters - **prompt** (string) - Required - The text prompt describing the desired video content. ### Request Body This endpoint does not expect a request body. All necessary information is passed via query parameters. ### Request Example ``` { "prompt": "@hazelio me jumps from the top of the Empire State Building with a colorful parachute, holding a selfie stick, smiling confidently while filming himself midair. The New York City skyline glows under a dramatic sunset. As he slowly descends, the scene cuts to a pizza delivery guy riding a motorcycle below, looking confused. Suddenly, the skydiver lands directly into the delivery guy’s lap, knocking them both off the bike. The pizza box flies into the air, spinning in slow motion. Freeze frame with comic sound effect as both scream. Cartoon style, fast-paced, exaggerated expressions, vibrant colors." } ``` ### Response #### Success Response (200) - **post_id** (string) - The ID of the generated post. - **total_tokens** (integer) - The total number of tokens used in the request. - **prompt_tokens** (integer) - The number of tokens used for the prompt. - **original_input** (string) - The original input URL or prompt. - **post_info** (object) - Contains details about the post. - **attachments_count** (integer) - Number of attachments. - **view_count** (integer) - Number of views. - **like_count** (integer) - Number of likes. - **title** (string) - The title or description of the generated video. #### Response Example (Success) ```json { "total_tokens": 4490, "prompt_tokens": 61, "post_id": "s_68f6140d88a88191a6b5c803d4e47b6c", "original_input": "https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c", "post_info": { "attachments_count": 1, "view_count": 2, "like_count": 3, "title": "@hazelio me jumps from the top of the Empire State Building with a colorful parachute, holding a selfie stick, smiling confidently while filming himself midair. The New York City skyline glows under a dramatic sunset. As he slowly descends, the scene cuts to a pizza delivery guy riding a motorcycle below, looking confused. Suddenly, the skydiver lands directly into the delivery guy’s lap, knocking them both off the bike. The pizza box flies into the air, spinning in slow motion. Freeze frame with comic sound effect as both scream. Cartoon style, fast-paced, exaggerated expressions, vibrant colors." } } ``` #### Error Response (e.g., 400) - **id** (string) - An error identifier. - **object** (string) - The type of object returned (e.g., "chat.completion"). - **created** (integer) - Timestamp of creation. - **model** (string) - The model used. - **choices** (array) - An array of choices, usually containing an error message. - **finish_reason** (string) - The reason for the finish. - **index** (integer) - The index of the choice. - **message** (object) - The error message details. - **role** (string) - The role of the sender (e.g., "assistant"). - **content** (string) - The error message explaining the failure. - **usage** (object) - Token usage information. - **completion_tokens** (integer) - Tokens used for completion. - **total_tokens** (integer) - Total tokens used. - **prompt_tokens** (integer) - Tokens used for the prompt. #### Response Example (Error) ```json { "id": "chatcmpl-sora-1760959366", "object": "chat.completion", "created": 1760959366, "model": "sora_url", "choices": [ { "finish_reason": "stop", "index": 0, "message": { "role": "assistant", "content": "解析失败:无法从 URL 中提取有效的帖子ID" } } ], "usage": { "completion_tokens": 55, "total_tokens": 117, "prompt_tokens": 62 } } ``` ``` -------------------------------- ### POST /v1/videos Source: https://6ibmqmipvf.apifox.cn/363035116e0 Generates a video from a text prompt asynchronously. Supports various Sora2 models with different resolutions and durations. Please adhere to the content review guidelines to avoid delays or failures. ```APIDOC ## POST /v1/videos ### Description This endpoint initiates an asynchronous video generation task using Sora2. It allows selection from several models, categorized by resolution, duration, and performance (normal vs. pro). **Available Models:** * **Normal Mode (3-5 minutes processing):** * `sora2-landscape`: Landscape (desktop) 10 seconds * `sora2-portrait`: Portrait (mobile) 10 seconds * `sora2-landscape-15s`: Landscape (desktop) 15 seconds * `sora2-portrait-15s`: Portrait (mobile) 15 seconds * **Pro Mode (15-30 minutes processing):** * `sora2-pro-landscape-25s`: Landscape (desktop) 25 seconds * `sora2-pro-portrait-25s`: Portrait (mobile) 25 seconds * `sora2-pro-portrait-hd-15s`: Landscape (desktop) 15 seconds HD * `sora2-pro-landscape-hd-15s`: Portrait (mobile) 15 seconds HD **Content Review Process:** 1. **Human/Human-like Content Review:** No human or human-like images allowed. 2. **Prompt Compliance Check:** Prohibits violence, pornography, copyright infringement, or celebrity information. 3. **Generation Result Review:** Content deemed non-compliant (e.g., violent, extreme imagery) may be rejected even if 90% generated. **Note:** Ensure compliance with review requirements to prevent delays or failures. ### Method POST ### Endpoint `/v1/videos` ### Parameters #### Header Parameters - **Authorization** (string) - Optional - `Bearer {{YOUR_API_KEY}}` - **Accept** (string) - Optional - `application/json` - **Content-Type** (string) - Optional - `application/json` #### Request Body - **prompt** (string) - Required - The text description for video generation. - **model** (string) - Required - The Sora2 model to use for generation (e.g., `sora2-portrait-15s`). ### Request Example ```json { "prompt": "A cute dog flying a plane", "model": "sora2-portrait-15s" } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the video generation task. - **object** (string) - Type of the object, should be 'video'. - **model** (string) - The model used for generation. - **status** (string) - The current status of the task (e.g., 'queued', 'processing', 'completed', 'failed'). - **progress** (integer) - The completion progress of the task (0-100). - **created_at** (integer) - Timestamp when the task was created. - **size** (string) - The resolution of the generated video (e.g., '720x720'). #### Response Example ```json { "id": "video_bd6095f9-2ac2-4be9-8d9c-e7680526c209", "object": "video", "model": "sora2-portrait-15s", "status": "queued", "progress": 0, "created_at": 1760853434, "size": "720x720" } ``` ``` -------------------------------- ### POST /v1/videos Source: https://6ibmqmipvf.apifox.cn/363038060e0 Asynchronously generates a video from an input image using the Sora2 model. Supports various model configurations for different aspect ratios, durations, and quality settings. Includes detailed content moderation policies. ```APIDOC ## POST /v1/videos ### Description This endpoint allows you to generate videos from an input image using the Sora2 model. The process is asynchronous, and you will receive a task ID to check the status later. The API supports several model variants, including landscape, portrait, and high-definition options, with varying processing times. It's crucial to adhere to the content review guidelines to avoid delays or failures in video generation. ### Method POST ### Endpoint /v1/videos ### Parameters #### Header Parameters - **Authorization** (string) - Optional - Bearer token for authentication. - **Accept** (string) - Optional - Specifies the desired response format (e.g., application/json). - **Content-Type** (string) - Optional - Specifies the request content type (e.g., application/json). #### Request Body - **input_reference** (file) - Required - The input image file. - **prompt** (string) - Required - The text prompt describing the desired video content. - **model** (string) - Required - The Sora2 model to use (e.g., `sora2-landscape`, `sora2-portrait`, `sora2-pro-landscape-25s`). - **size** (string) - Optional - The desired video resolution (e.g., `1280x720`). - **seconds** (string) - Optional - The desired video duration in seconds. ### Request Example ```json { "input_reference": "file://C:\\PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png", "prompt": "A dog playing fetch in a park", "model": "sora2-landscape", "size": "1920x1080", "seconds": "10" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the video generation task. - **object** (string) - The type of object returned (e.g., `video`). - **model** (string) - The model used for generation. - **status** (string) - The current status of the task (e.g., `queued`, `processing`, `succeeded`, `failed`). - **progress** (integer) - The progress of the task in percentage. - **created_at** (integer) - The timestamp when the task was created. - **seconds** (string) - The duration of the generated video. - **size** (string) - The resolution of the generated video. #### Response Example ```json { "id": "video_aeb1cf3f-45e3-49fc-be8f-9b62a1d0e2bc", "object": "video", "model": "sora2-portrait-15s", "status": "queued", "progress": 0, "created_at": 1760852730, "seconds": "4", "size": "1280x720" } ``` ### Model Options **Standard Models (Approx. 3-5 minutes processing time):** - `sora2-landscape`: Landscape (10 seconds) - `sora2-portrait`: Portrait (10 seconds) - `sora2-landscape-15s`: Landscape (15 seconds) - `sora2-portrait-15s`: Portrait (15 seconds) **Pro Models (Approx. 15-30 minutes processing time):** - `sora2-pro-landscape-25s`: Landscape (25 seconds) - `sora2-pro-portrait-25s`: Portrait (25 seconds) - `sora2-pro-portrait-hd-15s`: Portrait HD (15 seconds) - `sora2-pro-landscape-hd-15s`: Landscape HD (15 seconds) ### Content Review Guidelines 1. **Human/Human-like Content**: No real or simulated human images are allowed. 2. **Prompt Compliance**: Prohibited content includes violence, pornography, copyright infringement, or celebrity information. 3. **Generated Content Review**: Videos that violate compliance rules, even if partially generated, may fail review. **Note**: Ensure all content and prompts comply with these guidelines to prevent processing delays or task failures. ``` -------------------------------- ### POST /v1/chat/completions Source: https://6ibmqmipvf.apifox.cn/363031151e0 This endpoint is designed for entertainment use and is not intended for production efficiency. It supports chat format compatibility for mini-program chat integration, with a response time of approximately 15 minutes. Streamed output is recommended. It also supports various Sora2 video generation models. ```APIDOC ## POST /v1/chat/completions ### Description This endpoint facilitates chat communication compatible with chat formats and enables video generation using Sora2 models. It is primarily for entertainment purposes and advises a 15-minute response time, recommending stream output. It lists available Sora2 models for different aspect ratios and durations. ### Method POST ### Endpoint /v1/chat/completions ### Parameters #### Header Parameters - **Authorization** (string) - Optional - Bearer {{YOUR_API_KEY}} - **Accept** (string) - Optional - application/json - **Content-Type** (string) - Optional - application/json #### Request Body - **model** (string) - Required - Specifies the Sora2 model to use (e.g., sora2-portrait-15s). - **stream** (boolean) - Required - Whether to use stream output. - **messages** (array) - Required - An array of message objects, each containing a 'role' (user) and 'content'. - **content.type** (string) - Required - Type of content ('text' or 'image_url'). - **content.text** (string) - Required if type is 'text' - The text content of the message. - **content.image_url.url** (string) - Required if type is 'image_url' - The URL of the image. ### Request Example ```json { "model": "sora2-portrait-15s", "stream": true, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "竖屏 动起来" }, { "type": "image_url", "image_url": { "url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png" } } ] } ] } ``` ### Response #### Success Response (200) - **Response Body** (object) - The response from the chat completion or video generation. #### Response Example ```json { "example": "response body" } ``` ### Content Review Process 1. **Human or Human-like Content Review**: Must not contain real or simulated human images. 2. **Prompt Compliance Check**: Prohibits violent, pornographic, copyright-infringing, or celebrity-related information. 3. **Generation Result Review**: If generated results are non-compliant (e.g., violent, extreme images), they may fail review even if over 90% complete. **Note**: Ensure compliance with review requirements to avoid delays or failures. ``` -------------------------------- ### POST /v1/videos Source: https://6ibmqmipvf.apifox.cn/368653012e0 Generates a video from a given image URL using the Sora2 model. This is an asynchronous request, and the video generation process will occur in the background. ```APIDOC ## POST /v1/videos ### Description This endpoint allows you to generate a video from an image provided via a URL. The request is asynchronous, meaning the video generation will be processed in the background. Supports various Sora2 models for landscape and portrait orientations, with options for different quality and speed settings. ### Method POST ### Endpoint `/v1/videos` ### Parameters #### Header Parameters - **Authorization** (string) - Optional - Bearer token for authentication. - **Accept** (string) - Optional - Specifies the desired response format, defaults to `application/json`. - **Content-Type** (string) - Optional - Specifies the request body format, defaults to `application/json`. #### Query Parameters None #### Request Body - **image_url** (string) - Required - The URL of the image to be used for video generation. Supports JPG, PNG, and other common image formats. - **prompt** (string) - Required - A text prompt describing the desired video content. - **model** (string) - Required - The Sora2 model to use for generation. Examples include `sora2-portrait-15s`, `sora2-pro-landscape-25s`, etc. Refer to the documentation for available models and their use cases. ### Request Example ```json { "image_url": "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png", "prompt": "根据我的图片生成一个 广告宣传片", "model": "sora2-portrait-15s" } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the video generation task. - **object** (string) - Type of the object, expected to be `video`. - **model** (string) - The model used for generation. - **status** (string) - Current status of the video generation task (e.g., `queued`, `processing`, `completed`, `failed`). - **progress** (integer) - The completion progress of the video generation task, from 0 to 100. - **created_at** (integer) - Timestamp indicating when the task was created. - **size** (string) - The resolution of the generated video (e.g., `720x720`). #### Response Example ```json { "id": "video_bd6095f9-2ac2-4be9-8d9c-e7680526c209", "object": "video", "model": "sora2-portrait-15s", "status": "queued", "progress": 0, "created_at": 1760853434, "size": "720x720" } ``` ### Content Guidelines - **Real or拟-Human Content**: Generation of real or拟-human images is prohibited. - **Prompt Compliance**: Prompts must not contain violent, pornographic, copyright-infringing, or celebrity-related content. - **Output Review**: Generated content may fail review even if processing is advanced, especially if it contains violent or extreme imagery. **Note**: Ensure prompts and generated content comply with review requirements to avoid delays or failures. ``` -------------------------------- ### OpenAPI Specification for Sora Video Generation API Source: https://6ibmqmipvf.apifox.cn/368663635e0 This YAML snippet defines the OpenAPI 3.0.1 specification for the Sora video generation API. It includes details for the '/v1/chat/completions' POST endpoint, specifying request parameters, body schema, and response structure. Authentication is handled via a 'Bearer {{YOUR_API_KEY}}' header. The 'sora-drafts-url' model is used for processing draft content. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /v1/chat/completions: post: summary: sora2 去水印(草稿未发作品) deprecated: false description: |- 1. **前提条件** - 草稿去水印必须 **正确传递 AT 功能**,否则无法正确获取草稿内容。 2. **接口与身份验证** - 草稿获取接口: ``` https://sora.chatgpt.com/api/auth/session ``` - 需使用 **accessToken 完整字段**,确保权限验证正确。 3. **兼容模式** - 为了方便操作,采用 **chat 兼容模式**。 - 模型选择:`sora-drafts-url` 4. **注意事项** - 请求参数中 **首尾不要有空格**,确保字段完整无误。 - 保证传递的 AT 与 session 信息一致,否则会获取失败。 tags: - sora2视频生成 parameters: - name: Authorization in: header description: '' required: false example: ' Bearer {{YOUR_API_KEY}}' schema: type: string requestBody: content: application/json: schema: type: object properties: model: type: string description: 解析模型 messages: type: array items: type: object properties: role: type: string description: chat格式 content: type: string description: 帖子地址 x-apifox-orders: - role - content required: - role - content required: - model - messages x-apifox-orders: - model - messages example: model: sora-drafts-url messages: - role: user content: >- eyJhbGciOiJSUzI1NiIsImtpZCI6IjE5MzQ0ZTY1LWJiYzktNDRkMS1hOWQwLWY5NTdiMDc5YmQwZSIsInR5cCI6IkpXVCJ9.eyJh responses: '200': description: '' content: application/json: schema: type: object properties: id: type: string object: type: string created: type: integer model: type: string choices: type: array items: type: object properties: finish_reason: type: string index: type: integer message: type: object properties: role: type: string content: type: string required: - role - content links: type: object properties: gif: type: string text: type: string id: type: string mp4: type: string mp4_wm: type: string md: type: string thumbnail: type: string required: - gif - text - id - mp4 - mp4_wm - md - thumbnail usage: type: object properties: completion_tokens: type: integer total_tokens: type: integer prompt_tokens: type: integer required: - completion_tokens - total_tokens - prompt_tokens post_id: type: string original_input: type: string post_info: type: object properties: attachments_count: type: integer view_count: type: integer like_count: type: integer title: type: string ``` -------------------------------- ### Sora2 Image-to-Video Generation (Direct Upload - Asynchronous) Source: https://context7_llms Generates video from an uploaded image using Sora2. This is an asynchronous request. ```APIDOC ## POST /api/sora2/image-to-video/async/upload ### Description Initiates an asynchronous video generation task from a directly uploaded image using the Sora2 model. A task ID will be provided for tracking. ### Method POST ### Endpoint /api/sora2/image-to-video/async/upload ### Parameters #### Request Body - **image** (file) - Required - The image file to generate video from. - **prompt** (string) - Optional - Text description to guide video generation from the image. ### Request Example (This is a multipart/form-data request) ``` --boundary Content-Disposition: form-data; name="image"; filename="my_image.jpg" Content-Type: image/jpeg [binary image data] --boundary Content-Disposition: form-data; name="prompt" Optional prompt text here. --boundary-- ``` ### Response #### Success Response (200) - **task_id** (string) - The unique identifier for the asynchronous video generation task. #### Response Example ```json { "task_id": "task_def456uvw" } ``` ``` -------------------------------- ### LLM API Request Schema Source: https://6ibmqmipvf.apifox.cn/368663635e0 Defines the required fields for a successful LLM API request for video generation. Ensures all necessary parameters like attachments_count, view_count, like_count, and title are provided. ```yaml required: - attachments_count - view_count - like_count - title ``` -------------------------------- ### Sora2 Image-to-Video Generation (URL - Asynchronous) Source: https://context7_llms Generates video from an image URL using Sora2. This is an asynchronous request. API endpoint: api-2.codeai.my ```APIDOC ## POST /api/sora2/image-to-video/async/url ### Description Initiates an asynchronous video generation task from an image URL using the Sora2 model. The generation is handled in the background, and a task ID is returned for status checks. The API endpoint for this service is `api-2.codeai.my`. ### Method POST ### Endpoint /api/sora2/image-to-video/async/url ### Parameters #### Request Body - **image_url** (string) - Required - The URL of the image to generate video from. - **prompt** (string) - Optional - Text description to guide video generation from the image. ### Request Example ```json { "image_url": "https://example.com/my_image.jpg", "prompt": "A scene based on this image." } ``` ### Response #### Success Response (200) - **task_id** (string) - The unique identifier for the asynchronous video generation task. #### Response Example ```json { "task_id": "task_ghi789rst" } ``` ``` -------------------------------- ### Sora2 Video Generation - Watermark Removal (Published Works) Source: https://context7_llms Generates a direct link to the original video without watermarks for published works. ```APIDOC ## POST /api/sora2/unwatermark/published ### Description Outputs a direct link to the original video without watermarks for published works. ### Method POST ### Endpoint /api/sora2/unwatermark/published ### Parameters #### Query Parameters - **video_url** (string) - Required - The URL of the published video. ### Request Example ```json { "video_url": "https://example.com/published_video.mp4" } ``` ### Response #### Success Response (200) - **original_url** (string) - The direct link to the original video without watermark. #### Response Example ```json { "original_url": "https://example.com/original_video.mp4" } ``` ``` -------------------------------- ### Sora2 Text-to-Video Generation (Asynchronous) Source: https://context7_llms Generates video from text input using Sora2. This is an asynchronous request, meaning the video generation happens in the background. ```APIDOC ## POST /api/sora2/text-to-video/async ### Description Initiates an asynchronous video generation task from text input using the Sora2 model. The API will return a task ID that can be used to check the progress and retrieve the video later. ### Method POST ### Endpoint /api/sora2/text-to-video/async ### Parameters #### Request Body - **prompt** (string) - Required - The text description for the video. - **negative_prompt** (string) - Optional - Text describing elements to exclude from the video. - **duration_seconds** (integer) - Optional - Desired duration of the video in seconds. ### Request Example ```json { "prompt": "A futuristic city skyline at sunset, with flying cars.", "negative_prompt": "rain, clouds", "duration_seconds": 10 } ``` ### Response #### Success Response (200) - **task_id** (string) - The unique identifier for the asynchronous video generation task. #### Response Example ```json { "task_id": "task_abc123xyz" } ``` ``` -------------------------------- ### Sora2 View Video Content Source: https://context7_llms Allows viewing the content of a generated video using its task ID. Important: Ensure you have the correct task ID for the generation task. ```APIDOC ## GET /api/sora2/video/view ### Description Provides access to view the content of a video generated by Sora2. You need to provide the corresponding task ID for the generation process. Please pay close attention to the task ID. ### Method GET ### Endpoint /api/sora2/video/view ### Parameters #### Query Parameters - **task_id** (string) - Required - The ID of the video generation task. ### Request Example ``` GET /api/sora2/video/view?task_id=task_abc123xyz ``` ### Response #### Success Response (200) - **video_content** (string) - A URL or stream to the video content. #### Response Example ```json { "video_content": "https://example.com/stream/generated_video.mp4" } ``` ```