### Install Dependencies with Pip Source: https://doc.apicore.ai/doc-6757666 This section shows how to install the necessary Python libraries, `asyncio` and `aiohttp`, using pip. These libraries are essential for building asynchronous and concurrent network applications. ```sh pip install asyncio pip install aiohttp ``` -------------------------------- ### Example API Response for Task Submission Source: https://doc.apicore.ai/api-301177935 Illustrates a successful API response after submitting a task, showing the task ID, initial status, and timestamps. This example conforms to the defined TaskResponse schema. ```APIDOC example: code: 0 message: SUCCEED request_id: CjNQtmctxFMAAAAAAHH7hA data: task_id: CjNQtmctxFMAAAAAAHH7hA task_status: submitted created_at: 1731252406651 updated_at: 1731252406651 ``` -------------------------------- ### OpenAPI Spec: Get Task Status (Seedance API) Source: https://doc.apicore.ai/api-317951323 This entry details the OpenAPI specification for retrieving the status and generated content of a video generation task. It includes the endpoint, required parameters, response structure, and an example response. ```APIDOC OpenAPI Specification for Seedance Video Generation API Endpoint: GET /volc/v1/contents/generations/tasks/{task_id} Summary: 获取任务-seedance (Get Task - Seedance) Description: Retrieves details for a specific video generation task. Refer to official documentation for more information: https://www.volcengine.com/docs/82379/1520757 Tags: - 视频生成/Seedance (Video Generation/Seedance) Parameters: - name: task_id in: path description: The unique identifier for the video generation task. required: true schema: type: string example: cgt-20250613160030-2dvd7 Responses: '200': description: Successful response containing task details. content: application/json: schema: type: object properties: id: type: string description: The task ID. model: type: string description: The AI model used for generation. status: type: string description: The current status of the task (e.g., 'succeeded'). content: type: object description: Generated content details. properties: video_url: type: string description: URL of the generated video. required: - video_url usage: type: object description: Resource usage information. properties: completion_tokens: type: integer description: Number of completion tokens used. total_tokens: type: integer description: Total tokens used. required: - completion_tokens - total_tokens created_at: type: integer description: Timestamp when the task was created. updated_at: type: integer description: Timestamp when the task was last updated. required: - id - model - status - content - usage - created_at - updated_at example: id: cgt-20250629201507-n6k56 model: doubao-seaweed-241128 status: succeeded content: video_url: >- https://ark-content-generation-cn-beijing.tos-cn-beijing.volces.com/doubao-seaweed/02175119930820700000000000000000000ffffac15900c3d3563.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYjg3ZjNlOGM0YzQyNGE1MmI2MDFiOTM3Y2IwMTY3OTE%2F20250629%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20250629T121547Z&X-Tos-Expires=86400&X-Tos-Signature=5fc33b9844292396e7946dd74dc1c9c9e4e5c6a26ae0f1b3e14155730a581050&X-Tos-SignedHeaders=host usage: completion_tokens: 108900 total_tokens: 108900 created_at: 1751199308 updated_at: 1751199347 Security: - bearer: [] Related API Endpoints: - POST /volc/v1/contents/generations/tasks (for creating tasks) ``` ```YAML openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /volc/v1/contents/generations/tasks/{task_id}: get: summary: 获取任务-seedance deprecated: false description: 详情请参考官方文档 https://www.volcengine.com/docs/82379/1520757 tags: - 视频生成/Seedance parameters: - name: task_id in: path description: '' required: true example: cgt-20250613160030-2dvd7 schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: id: type: string model: type: string status: type: string content: type: object properties: video_url: type: string x-apifox-orders: - video_url required: - video_url usage: type: object properties: completion_tokens: type: integer total_tokens: type: integer x-apifox-orders: - completion_tokens - total_tokens required: - completion_tokens - total_tokens created_at: type: integer updated_at: type: integer x-apifox-orders: - id - model - status - content - usage - created_at - updated_at required: - id - model - status - content - usage - created_at - updated_at example: id: cgt-20250629201507-n6k56 model: doubao-seaweed-241128 status: succeeded content: video_url: >- https://ark-content-generation-cn-beijing.tos-cn-beijing.volces.com/doubao-seaweed/02175119930820700000000000000000000ffffac15900c3d3563.mp4?X-Tos-Algorithm=TOS4-HMAC-SHA256&X-Tos-Credential=AKLTYjg3ZjNlOGM0YzQyNGE1MmI2MDFiOTM3Y2IwMTY3OTE%2F20250629%2Fcn-beijing%2Ftos%2Frequest&X-Tos-Date=20250629T121547Z&X-Tos-Expires=86400&X-Tos-Signature=5fc33b9844292396e7946dd74dc1c9c9e4e5c6a26ae0f1b3e14155730a581050&X-Tos-SignedHeaders=host usage: completion_tokens: 108900 total_tokens: 108900 created_at: 1751199308 updated_at: 1751199347 headers: {} x-apifox-name: 成功 security: - bearer: [] x-apifox-folder: 视频生成/Seedance x-apifox-status: developing x-run-in-apifox: https://app.apifox.com/web/project/6463951/apis/api-317951323-run components: schemas: {} securitySchemes: Authorization: type: customize bearer: type: http scheme: bearer servers: [] security: [] ``` -------------------------------- ### Kelin Video Generation APIs Source: https://context7_llms Documentation for Kelin's video generation API, supporting image generation, virtual try-on, text-to-video, image-to-video, video extension, and task querying. ```APIDOC Kelin API Documentation: - Official Format [Image Generation](https://doc.apicore.ai/api-301777935.md): Generates images using Kelin. - Official Format [Virtual Try-on](https://doc.apicore.ai/api-301756602.md): Replaces clothing on a person in an image. Upload a model image and a clothing image for one-click outfit changes. - Official Format [Text-to-Video](https://doc.apicore.ai/api-301177936.md): Generates videos from text prompts. - Official Format [Image-to-Video](https://doc.apicore.ai/api-301177937.md): Generates videos from input images. - Official Format [Video Extension](https://doc.apicore.ai/api-301759336.md): Extends existing videos. - Official Format [Query Task](https://doc.apicore.ai/api-301177938.md): Retrieves task status and results. ``` -------------------------------- ### MiniMax Video Generation APIs (V2) Source: https://context7_llms API documentation for MiniMax V2, covering task creation and retrieval for video generation. ```APIDOC MiniMax API Documentation (V2): - Create Task - Hailuo [https://doc.apicore.ai/api-317952358.md]: Creates a video generation task using MiniMax V2 (Hailuo). - Get Task [https://doc.apicore.ai/api-317952664.md]: Retrieves the status of a MiniMax V2 task. ``` -------------------------------- ### OpenAPI Spec: Get Task Endpoint Source: https://doc.apicore.ai/api-317952664 This snippet defines the OpenAPI 3.0.1 specification for a GET request to retrieve task information. It includes details on the endpoint path, query parameters like `task_id`, and expected responses. ```APIDOC openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /minimax/v2/async/minimax-hailuo-02: get: summary: 获取任务 deprecated: false description: '' tags: - 视频生成/MiniMax/V2 parameters: - name: task_id in: query description: '' required: false example: 001027e8-dc8b-4345-b54e-03b155dd7d52 schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: {} headers: {} x-apifox-name: 成功 security: - bearer: [] x-apifox-folder: 视频生成/MiniMax/V2 x-apifox-status: developing x-run-in-apifox: https://app.apifox.com/web/project/6463951/apis/api-317952664-run components: schemas: {} securitySchemes: Authorization: type: customize bearer: type: http scheme: bearer servers: [] security: [] ``` -------------------------------- ### OpenAPI: Get Task Image Seed Source: https://doc.apicore.ai/api-301177857 Defines the GET endpoint `/mj/task/{id}/image-seed` for retrieving task image seeds. Includes path parameter `id`, optional headers like `Authorization`, and a 200 OK response with `code`, `description`, and `result` fields. ```APIDOC openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /mj/task/{id}/image-seed: get: summary: 获取任务图片的ImageSeed deprecated: false description: '' tags: - 绘画模型/Midjourney/任务查询 parameters: - name: id in: path description: | 任务ID required: true schema: type: string - name: Content-Type in: header description: Bearer required: false example: application/json schema: type: string - name: Authorization in: header description: '' required: false example: Bearer sk-xxxx schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: code: type: integer description: description: type: string result: type: string required: - code - description - result x-apifox-orders: - code - description - result example: code: 0 description: string result: string headers: {} x-apifox-name: 成功 security: - bearer: [] x-apifox-folder: 绘画模型/Midjourney/任务查询 x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/6463951/apis/api-301177857-run components: schemas: {} securitySchemes: Authorization: type: customize bearer: type: http scheme: bearer servers: [] security: [] ``` -------------------------------- ### Seedance Video Generation APIs Source: https://context7_llms Documentation for Seedance's video generation API, covering task creation and retrieval, with references to official Volcengine documentation. ```APIDOC Seedance API Documentation: - Create Task [https://doc.apicore.ai/api-317951129.md]: Creates a Seedance video generation task. Refer to official documentation: https://www.volcengine.com/docs/82379/1520757 - Get Task [https://doc.apicore.ai/api-317951323.md]: Retrieves the status of a Seedance task. Refer to official documentation: https://www.volcengine.com/docs/82379/1520757 ``` -------------------------------- ### Create Task (Hailuo) - MiniMax V2 API Source: https://doc.apicore.ai/api-317952358 This API endpoint allows for the creation of video generation tasks using the MiniMax Hailuo model. It requires a prompt, duration, resolution, and an image URL. The duration can be 6 or 10 seconds, and resolution can be 768P or 1080P. The API supports prompt expansion and uses bearer token authentication. ```APIDOC openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /minimax/v2/async/minimax-hailuo-02: post: summary: 创建任务-海螺 deprecated: false description: '' tags: - 视频生成/MiniMax/V2 parameters: [] requestBody: content: application/json: schema: type: object properties: model: type: string prompt: type: string duration: type: integer enum: - 6 - 10 x-apifox-enum: - value: 6 name: '' description: '' - value: 10 name: '' description: '' resolution: type: integer enum: - 768P - 1080P x-apifox-enum: - value: 768P name: '' description: '' - value: 1080P name: '' description: '' image_url: type: string enable_prompt_expansion: type: string x-apifox-orders: - model - prompt - duration - resolution - image_url - enable_prompt_expansion required: - prompt - duration - resolution - image_url - enable_prompt_expansion example: model: minimax-hailuo-02 image_url: >- https://static.ppinfra.com/docs/assets/minimax-hailuo-video-02-input-image.jpg prompt: 戴着太阳镜的毛茸茸的熊猫在日出时的雪山顶上跳舞,左移运镜 duration: 6 resolution: 768P enable_prompt_expansion: true responses: '200': description: '' content: application/json: schema: type: object properties: {} headers: {} x-apifox-name: 成功 security: - bearer: [] x-apifox-folder: 视频生成/MiniMax/V2 x-apifox-status: developing x-run-in-apifox: https://app.apifox.com/web/project/6463951/apis/api-317952358-run components: schemas: {} securitySchemes: Authorization: type: customize bearer: type: http scheme: bearer servers: [] security: [] ``` -------------------------------- ### Get WAV File (OpenAPI) Source: https://doc.apicore.ai/api-305025550 This API endpoint allows retrieval of WAV audio files using a unique clip identifier. It requires an Authorization header for authentication and accepts the clip ID as a path parameter. The response includes a URL to the WAV file. ```APIDOC openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /suno/act/wav/{clip_id}: get: summary: 获取 wav 格式文件 deprecated: false description: '' tags: - 音乐生成/Suno parameters: - name: clip_id in: path description: '' required: true schema: type: string - name: Content-Type in: header description: '' required: false example: application/json schema: type: string - name: Authorization in: header description: '' required: false example: Bearer sk-xxxx schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: {} example: wav_file_url: https://cdn1.suno.ai/2dd391cd-996b-4843-9738-1aed26f170e4.wav headers: {} x-apifox-name: 成功 security: - bearer: [] x-apifox-folder: 音乐生成/Suno x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/6463951/apis/api-305025550-run components: schemas: {} securitySchemes: Authorization: type: customize bearer: type: http scheme: bearer servers: [] security: [] ``` -------------------------------- ### Luma Video Generation APIs (Multiple Formats) Source: https://context7_llms Comprehensive documentation for Luma's video generation APIs across different formats including official, VIP, Pro, and Goamz, covering chat, generation, task queries, and video extension. ```APIDOC Luma API Documentation: - Official Format [Chat Format lumavip](https://doc.apicore.ai/api-301177913.md): Luma VIP chat interface. - Official Format [Video Generation (generations)](https://doc.apicore.ai/api-301177914.md): Generates videos using Luma VIP. - Official Format [Query Task (task)](https://doc.apicore.ai/api-301177915.md): Retrieves Luma VIP task status. - Official Format [Video Extension (extend)](https://doc.apicore.ai/api-301177916.md): Extends existing Luma VIP videos. - Official Format Pro [Chat Format lumapro](https://doc.apicore.ai/api-301177917.md): Luma Pro chat interface (prioritizes stability). - Official Format Pro [Video Generation (generations)](https://doc.apicore.ai/api-301177918.md): Generates videos using Luma Pro. - Official Format Pro [Query Task (task)](https://doc.apicore.ai/api-301177919.md): Retrieves Luma Pro task status. - Official Format Pro [Video Extension (extend)](https://doc.apicore.ai/api-301177920.md): Extends existing Luma Pro videos. - Official Format [Chat Format luma](https://doc.apicore.ai/api-301177921.md): Luma standard chat interface. - Official Format [Video Generation (generations)](https://doc.apicore.ai/api-301177922.md): Generates videos using standard Luma. - Official Format [Query Task (task)](https://doc.apicore.ai/api-301177923.md): Retrieves standard Luma task status. - Official Format [Video Extension (extend)](https://doc.apicore.ai/api-301177924.md): Extends existing standard Luma videos. - Goamz Format [Video Generation (generations)](https://doc.apicore.ai/api-301177925.md): Generates videos using Luma with Goamz format. - Goamz Format [Query Task (task)](https://doc.apicore.ai/api-301177926.md): Retrieves Luma Goamz task status. - Goamz Format [Video Extension (extend)](https://doc.apicore.ai/api-301177927.md): Extends existing Luma Goamz videos. - Goamz Format VIP [Video Generation (generations)](https://doc.apicore.ai/api-301177928.md): Generates videos using Luma Goamz VIP format. - Goamz Format VIP [Query Task (task)](https://doc.apicore.ai/api-301177929.md): Retrieves Luma Goamz VIP task status. - Goamz Format VIP [Video Extension (extend)](https://doc.apicore.ai/api-301177930.md): Extends existing Luma Goamz VIP videos. - ChatGPT-Next-Web Format [Video Generation (generations)](https://doc.apicore.ai/api-301177931.md): Generates videos using Luma with ChatGPT-Next-Web format. - ChatGPT-Next-Web Format [Video Extension (extend)](https://doc.apicore.ai/api-301177932.md): Extends existing Luma ChatGPT-Next-Web videos. - ChatGPT-Next-Web Format [Query Task (task)](https://doc.apicore.ai/api-301177933.md): Retrieves Luma ChatGPT-Next-Web task status. - ChatGPT-Next-Web Format [Chat Format lumavip](https://doc.apicore.ai/api-301177934.md): Luma VIP chat interface for ChatGPT-Next-Web. ``` -------------------------------- ### Query Task API - GET /v1/lumavip/task Source: https://doc.apicore.ai/api-301177915 Provides an API endpoint to query task details using the GET method. It accepts an optional 'id' query parameter and returns task information, including prompt, state, creation timestamp, and video details upon successful completion. Authentication is required via a bearer token. ```APIDOC openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /v1/lumavip/task: get: summary: Query Task deprecated: false description: '' tags: - Video Generation / Luma / Luma (Official Format) / Official Format LumaVIP⚡️ parameters: - name: id in: query description: Returned in the interface required: false example: f0f605b3-e916-4101-aa53-78a0e542d093 schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: {} x-apifox-orders: [] examples: '1': summary: Success Example value: id: 9710efa1-7cf5-4ab5-a7b8-db53ec5c91ff prompt: move state: completed created_at: '2024-07-05T14:51:32.104000Z' video: url: >- https://filesystem.site/cdn/20240705/J2NUSRHkxf76IswH67gMYrXogHvDgy.mp4 width: 512 height: 512 thumbnail: null liked: null estimate_wait_seconds: null '2': summary: Success Example value: id: 9710efa1-7cf5-4ab5-a7b8-db53ec5c91ff prompt: move state: completed created_at: '2024-07-05T14:51:32.104000Z' video: url: >- https://filesystem.site/cdn/20240705/J2NUSRHkxf76IswH67gMYrXogHvDgy.mp4 width: 512 height: 512 thumbnail: null liked: null estimate_wait_seconds: null headers: {} x-apifox-name: Success security: - bearer: [] x-apifox-folder: Video Generation / Luma / Luma (Official Format) / Official Format LumaVIP⚡️ x-apifox-status: released x-run-in-apifox: https://app.apifox.com/web/project/6463951/apis/api-301177915-run components: schemas: {} securitySchemes: Authorization: type: customize bearer: type: http scheme: bearer servers: [] security: [] ``` -------------------------------- ### JimengAI Video Generation APIs Source: https://context7_llms Documentation for JimengAI's video generation services, including image-to-video, text-to-video, and querying task results. ```APIDOC JimengAI API Documentation: - Task: Image-to-Video [https://doc.apicore.ai/api-301700641.md]: Generates videos from input images. - Task: Text-to-Video [https://doc.apicore.ai/api-301712068.md]: Generates videos from text prompts. - Query: Task Result [https://doc.apicore.ai/api-301719330.md]: Retrieves the results of a task. ```