append api doc in Engine, Japense, and Korenes
This commit is contained in:
parent
74da86f7bf
commit
c515824bd9
404
wwwroot/public/api/api_en.md
Executable file → Normal file
404
wwwroot/public/api/api_en.md
Executable file → Normal file
@ -1,38 +1,392 @@
|
||||
# Yuanjing Platform API Specification
|
||||
# Yuanjing Platform API
|
||||
|
||||
The Yuanjing Platform provides APIs compatible with the OpenAI protocol for downstream systems. To access the API, please complete the following steps:
|
||||
Yuanjing Platform provides downstream systems with an API compatible with the OpenAI interface protocol. To enable the API, downstream systems need to follow these steps:
|
||||
* Register an account
|
||||
* Log in
|
||||
* Apply for an APIKEY
|
||||
* Top up (Recharge)
|
||||
* Apply for APIKEY
|
||||
* Recharge (Top-up)
|
||||
|
||||
Once completed, you can implement inference services for Text-to-Text, Text-to-Video (T2V), Image-to-Video (I2V), and Reference-to-Video (R2V). For supported models, please refer to the Model Hub.
|
||||
After completing the above steps, you can implement inference services for Text-to-Text, Text-to-Video, Image-to-Video, and Reference-to-Video according to the following examples.
|
||||
|
||||
## 1. Apply for APIKEY
|
||||
Users must log in via mobile at the Yuanjing Platform (https://ai.opencomputing.cn) and select "Create APIKEY". After submitting the required information, copy the generated APIKEY from the popup window.
|
||||
For models supported by the Yuanjing platform, please refer to the Model Square.
|
||||
|
||||
## 2. Recharge
|
||||
Users can recharge their accounts on the platform. Currently, Alipay is supported.
|
||||
## Apply for APIKEY
|
||||
|
||||
## 3. Check Balance
|
||||
* Log in to the platform.
|
||||
* Call up the user menu.
|
||||
* Click on "Finance".
|
||||
Users need to log in via mobile on the Yuanjing platform (https://ai.opencomputing.cn) and click "Create APIKEY".
|
||||
|
||||
## 4. API Configuration
|
||||
* **Base URL:** https://opencomputing.ai
|
||||
Enter the information and click submit, and the APIKEY creation is complete.
|
||||
|
||||
### OpenAI Compatible Chat Interface
|
||||
* Path: /llmage/v1/chat/completions
|
||||
* Method: POST
|
||||
* Headers:
|
||||
Click "Copy apikey", see the apikey in the pop-up window, and copy it.
|
||||
|
||||
## Recharge
|
||||
Users need to recharge on the Yuanjing platform. Currently, Alipay is supported.
|
||||
|
||||
## View Current Balance
|
||||
|
||||
* User Login
|
||||
* Call up user menu
|
||||
* Click "Finance"
|
||||
|
||||
## API Base URL
|
||||
https://opencomputing.ai
|
||||
|
||||
## OpenAI Compatible Interface
|
||||
We provide a set of APIs compatible with OpenAI.
|
||||
|
||||
### Text Generation
|
||||
* path: /llmage/v1/chat/completions
|
||||
* method: 'POST'
|
||||
* headers
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>"
|
||||
"Authorization": "Bearer <your-apikey>" # APIKEY applied by the customer from the Yuanjing platform
|
||||
}
|
||||
```
|
||||
* data
|
||||
{
|
||||
"model": # Model ID, the name provided by the supplier
|
||||
"prompt": # Prompt, must be entered
|
||||
"sys_prompt" # System prompt, optional
|
||||
"stream" # Stream output switch
|
||||
"..." # Other prompts
|
||||
}
|
||||
|
||||
## 5. Task Status Query
|
||||
* Path: /llmage/tasks
|
||||
* Method: GET
|
||||
* Params: taskid
|
||||
* Statuses: SUCCEEDED, FAILED, CREATED, PENDING, RUNNING.
|
||||
* Return
|
||||
Streaming or non-streaming results conforming to the OpenAI protocol.
|
||||
|
||||
* Streaming:
|
||||
```
|
||||
./oc.curl 你是谁
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"logprobs": null, "index": 0, "delta": {"content": "", "role": "assistant"}}], "model": "qwen3-max", "reasoning_content": null, "content": "", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u6211\u662f", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u6211\u662f", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u901a\u4e49\u5343", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u901a\u4e49\u5343", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u95ee\uff0c\u963f\u91cc\u5df4\u5df4\u96c6\u56e2\u65d7\u4e0b\u7684", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u95ee\uff0c\u963f\u91cc\u5df4\u5df4\u96c6\u56e2\u65d7\u4e0b\u7684", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u8d85\u5927\u89c4\u6a21\u8bed\u8a00\u6a21\u578b\u3002\u6211\u80fd\u591f", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u8d85\u5927\u89c4\u6a21\u8bed\u8a00\u6a21\u578b\u3002\u6211\u80fd\u591f", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u56de\u7b54\u95ee\u9898\u3001\u521b\u4f5c\u6587\u5b57\uff0c", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u56de\u7b54\u95ee\u9898\u3001\u521b\u4f5c\u6587\u5b57\uff0c", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u6bd4\u5982\u5199\u6545\u4e8b\u3001\u5199\u516c", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u6bd4\u5982\u5199\u6545\u4e8b\u3001\u5199\u516c", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u6587\u3001\u5199\u90ae\u4ef6\u3001\u5199\u5267\u672c", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u6587\u3001\u5199\u90ae\u4ef6\u3001\u5199\u5267\u672c", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u3001\u903b\u8f91\u63a8\u7406\u3001\u7f16\u7a0b\u7b49\u7b49", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u3001\u903b\u8f91\u63a8\u7406\u3001\u7f16\u7a0b\u7b49\u7b49", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\uff0c\u8fd8\u80fd\u8868\u8fbe\u89c2\u70b9\uff0c\u73a9\u6e38\u620f", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\uff0c\u8fd8\u80fd\u8868\u8fbe\u89c2\u70b9\uff0c\u73a9\u6e38\u620f", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u7b49\u3002\u5982\u679c\u4f60\u6709\u4efb\u4f55\u95ee\u9898\u6216", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u7b49\u3002\u5982\u679c\u4f60\u6709\u4efb\u4f55\u95ee\u9898\u6216", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\u9700\u8981\u5e2e\u52a9\uff0c\u6b22\u8fce\u968f\u65f6\u544a\u8bc9\u6211", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\u9700\u8981\u5e2e\u52a9\uff0c\u6b22\u8fce\u968f\u65f6\u544a\u8bc9\u6211", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "\uff01", "role": null}, "index": 0}], "model": "qwen3-max", "reasoning_content": null, "content": "\uff01", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"delta": {"content": "", "role": null}, "index": 0, "finish_reason": "stop"}], "model": "qwen3-max", "reasoning_content": null, "content": "", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [], "model": "qwen3-max", "finish": "1", "usage": {"total_tokens": 70, "completion_tokens": 60, "prompt_tokens": 10, "prompt_tokens_details": {"cached_tokens": 0}}, "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
data: [DONE]
|
||||
```
|
||||
|
||||
* Non-streaming
|
||||
```
|
||||
./oc.curl 你是谁
|
||||
{"id": "chatcmpl-eea7abb9-24d5-9f70-b6f6-d7da4f22a8b8", "object": "chat.completion", "created": 1775011902, "choices": [{"finish_reason": "stop", "index": 0, "message": {"content": "我是通义千问,阿里巴巴集团旗下的超大规模语言模型。我能够回答问题、创作文字,比如写故事、写公文、写邮件、写剧本、逻辑推理、编程等等,还能表达观点,玩游戏等。如果你有任何问题或需要帮助,欢迎随时告诉我!", "role": "assistant"}}], "model": "qwen3-max", "reasoning_content": null, "content": "我是通义千问,阿里巴巴集团旗下的超大规模语言模型。我能够回答问题、创作文字,比如写故事、写公文、写邮件、写剧本、逻辑推理、编程等等,还能表达观点,玩游戏等。如果你有任何问题或需要帮助,欢迎随时告诉我!", "finish": "1", "usage": {"completion_tokens": 60, "prompt_tokens": 10, "prompt_tokens_details": {"cached_tokens": 0}, "total_tokens": 70}}
|
||||
```
|
||||
|
||||
## Text-to-Video
|
||||
Currently supported:
|
||||
| Model ID | Provider | Model Name |
|
||||
|--------|--------|--------|
|
||||
| o5vfXYD5BURJWRTWpopE5 | Alibaba Cloud | happyhorse-1.0-t2v |
|
||||
| YjjGgxO_Xma8PWsMjJvps | Doubao | doubao-seedance-2-0-260128 |
|
||||
| TWay-xd0p0pkEX-_Kuhto | We Token AI | dreamina-seedance-2-0-260128(*), dreamina-seedance-2-0-fast-260128 |
|
||||
| CrEMkFQfRCmbmopZsCqLj | Doubao | doubao-seedance-1-5-pro-251215 |
|
||||
| CrEMkFQfRCmbmopZsCqLj | Doubao | doubao-seedance-1-5-pro-251215 |
|
||||
| u9HZyfDoqU6uKI6M1BTks | Tongyi Wanxiang | wan2.6-t2v |
|
||||
| r0ill7L0s6PtBS8mkmg-7 | vidu | viduq3-pro |
|
||||
| YjjGgxO_Xma8PWsMjJvps | Doubao | eedance2.0 (Not enabled)|
|
||||
|
||||
### happyhorse-1.0-t2v Upload Data Requirements
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| model | Model Name | No | happyhorse-1.0-t2v | - |
|
||||
| prompt | string | Yes | - | Prompt words. Used to describe the video content you want to generate. |
|
||||
| resolution | string | No | `720p` | Video size. Specify the resolution of the generated video. <br>Optional values: <br>`480p`, `720p`, `1080p` |
|
||||
| ratio | string | No | adaptive | Optional: adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
|
||||
| duration | integer | No | `5` | Video duration. Specify the length of the generated video (seconds). <br>Optional values: integer seconds |
|
||||
|
||||
### seedance 2.0 Upload Data Requirements
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| model | Model Name | No | doubao-seedance-2-0-260128 | doubao-seedance-2-0-260128 or doubao-seedance-2-0-fast-260128 |
|
||||
| prompt | string | Yes | - | Prompt words. Used to describe the video content you want to generate. |
|
||||
| resolution | string | No | `720p` | Video size. Specify the resolution of the generated video. <br>Optional values: <br>`480p`, `720p`, `1080p` |
|
||||
| ratio | string | No | adaptive | Optional: adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
|
||||
| duration | integer | No | `5` | Video duration. Specify the length of the generated video (seconds). <br>Optional values: integer seconds |
|
||||
|
||||
### Wanxiang Upload Data Requirements
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| model | Model Name | No | (Starred) | - |
|
||||
| prompt | string | Yes | - | Prompt words. Used to describe the video content you want to generate. |
|
||||
| negative_prompt | string | No | (empty) | Negative prompt words. Used to describe content you want to avoid in the video. |
|
||||
| size | string | No | `1920*1080` | Video size. Specify the resolution of the generated video. <br>Optional values: <br>`832*480`, `480*832`, `624*624`, `1280*720`, `720*1280`, `960*960`, `1088*832`, `832*1088`, `1920*1080`, `1080*1920`, `1440*1440`, `1632*1248`, `1248*1632` |
|
||||
| duration | integer | No | `15` | Video duration. Specify the length of the generated video (seconds). <br>Optional values: <br>`5`, `10`, `15` |
|
||||
|
||||
### Vidu Upload Parameters
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| prompt | string | Yes | - | Prompt words. Used to describe the content of the generated video. |
|
||||
| off_peak | string | No | `N` | Off-peak execution. Whether to enable non-peak hour generation. <br>Optional values: `Y` (Yes), `N` (No) |
|
||||
| duration | integer | No | `10` | Video length. The duration of the generated video (seconds). <br>Range: 1-16 seconds (according to field description) |
|
||||
| ratio | string | No | `16:9` | Aspect ratio. Specify the video's picture ratio. <br>Optional values: <br>`16:9`, `9:16`, `4:3`, `3:4`, `1:1` |
|
||||
| resolution | string | No | `1080p` | Resolution. Specify the clarity of the generated video. <br>Optional values: <br>`540p`, `720p`, `1080p` |
|
||||
|
||||
### Seedance Upload Data Requirements
|
||||
| Field | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| prompt | string | Yes | - | Prompt words. Describe the content of the generated video. |
|
||||
| radio | string | No | - | Aspect ratio. Specify the aspect ratio of the video. <br>Optional values: <br>`16:9`, `keep_ratio`, `4:3`, `1:1`, `3:4`, `9:16`, `9:21`, `21:9`, `adaptive` |
|
||||
| resolution | string | No | `1080p` | Resolution. Specify video clarity. <br>Optional values: <br>`480p`, `720p`, `1080p` |
|
||||
| duration | integer | No | `12` | Video length. Video duration (seconds). |
|
||||
|
||||
### Example
|
||||
Example using seedance:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer <your-apikey-from-opencomputing.ai" \
|
||||
-d '{
|
||||
"llmid": "CrEMkFQfRCmbmopZsCqLj",
|
||||
"prompt": "小猫在抓老鼠",
|
||||
"duration": 5,
|
||||
"ratio": "16:9",
|
||||
"resolution": "480p"
|
||||
}'
|
||||
```
|
||||
|
||||
## Image-to-Video
|
||||
| Model ID | Provider | Model Name | Function |
|
||||
|--------|--------|--------|------|
|
||||
| 7y7kfYM0Xasizyi37WvAZ | Alibaba Cloud | happyhorse-1.0-i2v | Text/Image to Video |
|
||||
| UeYax4591ytnPcr9eumry | Doubao | doubao-seedance-2-0-260128 | Text/Image to Video |
|
||||
| tb0VSY6WeyGbzaolU1_qE | We Token AI | dreamina-seedance-2-0-fast-260128, dreamina-seedance-2-0-260128 | Text/Image to Video |
|
||||
| 7RTOJD6K8A7RXCMG4GnQ9 | Doubao | doubao-seedance-1-5-pro-251215 | Text/Image to Video |
|
||||
| 7RTOJD6K8A7RXCMG4GnQ9 | Doubao | doubao-seedance-1-5-pro-251215 | Text to Video |
|
||||
| FK_h7FLYnosv2TkMN4ATC | vidu | viduq3-pro | Text/Image to Video |
|
||||
| x4HksKp9mXR1Yv60mw6Py | Tongyi Wanxiang | wan2.6-r2v | Text/Image to Video |
|
||||
|
||||
### Happy Horse Upload Data Requirements
|
||||
The interface only supports first-frame-to-video.
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| prompt | string | Yes | - | Prompt words. Used to describe the video content you want to generate. |
|
||||
| image1_file | image file | Yes | - | First frame image. |
|
||||
| resolution | string | No | `720p` | Video size. Specify the resolution of the generated video. <br>Optional values: <br>`720P`, `1080P` |
|
||||
| duration | integer | No | `5` | Video duration. Specify the length of the generated video (seconds). <br>Optional values: integer seconds |
|
||||
|
||||
Example:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Authorization: Bearer <your-apikey>" \
|
||||
-F "llmid=o5vfXYD5BURJWRTWpopE5" \
|
||||
-F "prompt=一起来调科目三" \
|
||||
-F "duration=15" \
|
||||
-F "resolution=720P" \
|
||||
-F "image1_file=@./02.jpg"
|
||||
```
|
||||
|
||||
### seedance 2.0 Upload Data Requirements
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| model | Model Name | No | doubao-seedance-2-0-260128 | doubao-seedance-2-0-260128 or doubao-seedance-2-0-fast-260128 |
|
||||
| prompt | string | Yes | - | Prompt words. Describe the video content you want to generate. |
|
||||
| image1_file | image file | Yes | - | First frame image. |
|
||||
| image2_file | image file | Yes | - | Last frame image. |
|
||||
| resolution | string | No | `720p` | Video size. Specify video resolution. <br>Optional values: <br>`480p`, `720p`, `1080p` |
|
||||
| ratio | string | No | adaptive | Optional: adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
|
||||
| duration | integer | No | `5` | Video duration. Specify generated video length (seconds). |
|
||||
|
||||
### Tongyi Wanxiang Upload Data Requirements
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| prompt | string | Yes | - | Prompt words. |
|
||||
| negative_prompt | string | No | (empty) | Negative prompt words. |
|
||||
| size | string | No | `1920*1080` | Video size. <br>Optional: `1280*720`, etc. |
|
||||
| duration | integer | No | `15` | Video length. <br>Optional: `5`, `10`, `15` |
|
||||
| image_file1 | string/file | Yes | - | First frame image. (URL or Base64). |
|
||||
| image_file2 | string/file | Yes | - | Last frame image. (URL or Base64). |
|
||||
|
||||
### Vidu Upload Data Requirements
|
||||
| Field (Name) | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| model | string | No | `viduq3-pro` | Model version. <br>Optional: `viduq2-turbo`, `viduq3-pro` |
|
||||
| prompt | string | Yes | - | Prompt text. |
|
||||
| off_peak | string | No | `N` | Off-peak execution. `Y` (Yes), `N` (No) |
|
||||
| image_file1 | string/file | Yes | - | First frame image. |
|
||||
| image_file2 | string/file | Yes | - | Last frame image. |
|
||||
| duration | integer | No | `10` | Video length. 1-16 seconds. |
|
||||
| ratio | string | No | `16:9` | Aspect ratio. |
|
||||
| resolution | string | No | `1080p` | Resolution. |
|
||||
|
||||
### Seedance 1.5 Upload Data Requirements
|
||||
| Field | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | Model ID | Yes | - | - |
|
||||
| prompt | string | Yes | - | Prompt text describing the video content. |
|
||||
| radio | string | No | - | Aspect ratio. |
|
||||
| resolution | string | No | `1080p` | Resolution. |
|
||||
| duration | integer | No | `12` | Video length (seconds). |
|
||||
| image_file1 | string | No | - | First frame image. |
|
||||
| image_file2 | string | No | - | Last frame image. |
|
||||
|
||||
Example using seedance 1.5:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Authorization: Bearer <your-apikey-from-opencomputing.ai" \
|
||||
-F "model=dreamina-seedance-2-0-260128" \
|
||||
-F "llmid=CrEMkFQfRCmbmopZsCqLj" \
|
||||
-F "prompt=从图片1到图片2丝滑转换" \
|
||||
-F "duration=5" \
|
||||
-F "ratio=16:9" \
|
||||
-F "resolution=480p" \
|
||||
-F "image1_file=@./myimg1.jpg" \
|
||||
-F "image1_file=@./myimg2.jpg"
|
||||
```
|
||||
|
||||
## Reference-to-Video
|
||||
| Model ID | Provider | Model Name |
|
||||
|--------|--------|--------|
|
||||
| 6o9n_7u2K927hNlD8_72f | Alibaba Cloud | happyhorse-1.0-r2v |
|
||||
| dmPXF65TD1riKj9KaxLmg | Doubao | doubao-seedance-2-0-260128(*), doubao-seedance-2-0-fast-260128 |
|
||||
| nVbH7lEO51soqTbLGIHE_ | We Token AI | dreamina-seedance-2-0-260128(*), dreamina-seedance-2-0-fast-260128 |
|
||||
|
||||
### Happy Horse Upload Data Requirements
|
||||
| Field | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| model | str | No | | Default is the starred model |
|
||||
| prompt | string | Yes | - | Prompt text. |
|
||||
| ratio | string | No | - | Aspect ratio. |
|
||||
| resolution | string | No | `1080p` | Resolution. |
|
||||
| duration | integer | No | `12` | Video duration (seconds). |
|
||||
| image_files | array | Yes | [] | Reference image array. Up to 9 files. |
|
||||
|
||||
### seedance 2.0 Upload Data Requirements
|
||||
| Field | Type | Required | Default | Description |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| model | str | No | | Default is the starred model |
|
||||
| prompt | string | Yes | - | Prompt text. |
|
||||
| ratio | string | No | - | Aspect ratio. |
|
||||
| resolution | string | No | `1080p` | Resolution. |
|
||||
| duration | integer | No | `12` | Video length. |
|
||||
| image_files | array | Yes | [] | Reference image array. |
|
||||
| video_files | array | No | [] | Reference video array. |
|
||||
| audio_files | array | No | [] | Reference audio array. |
|
||||
|
||||
### Task Submission
|
||||
* path: /llmage/video
|
||||
* method: POST
|
||||
* headers
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>" # APIKEY applied by the customer from the Yuanjing platform
|
||||
}
|
||||
```
|
||||
* data
|
||||
Except for llmid, different models require different data. Please refer to the upload data instructions.
|
||||
|
||||
* Return
|
||||
```
|
||||
{
|
||||
"taskid": # Task ID, used later to query execution results
|
||||
"status": # Status includes:
|
||||
# SUCCEEDED: Success
|
||||
# FAILED: Failed
|
||||
# CREATED: Created
|
||||
# PENDING: Queued
|
||||
# RUNNING: Running
|
||||
}
|
||||
```
|
||||
|
||||
Return example:
|
||||
```
|
||||
{
|
||||
"taskid": "936759404378734592",
|
||||
"status": "created"
|
||||
}
|
||||
```
|
||||
|
||||
### Example
|
||||
seedance 2.0 Reference-to-Video
|
||||
```
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Authorization: Bearer <APIKEY>" \
|
||||
-F "llmid=dmPXF65TD1riKj9KaxLmg" \
|
||||
-F "model": "doubao-seedance-2-0-260128" \
|
||||
-F "image_files=@./1.jpg" \
|
||||
-F "image_files=@./2.jpg" \
|
||||
-F "prompt=平滑过度从第一张图片到第二张图片" \
|
||||
-F "ratio=4:3" \
|
||||
-F "resolution=720p" \
|
||||
-F "duration=4"
|
||||
```
|
||||
|
||||
## Query Task Status
|
||||
* path: /llmage/tasks
|
||||
* method: GET
|
||||
* headers
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>" # APIKEY applied from Yuanjing platform
|
||||
}
|
||||
```
|
||||
* params
|
||||
```
|
||||
{
|
||||
"taskid": "936759404378734592"
|
||||
}
|
||||
```
|
||||
* Return
|
||||
```
|
||||
{
|
||||
"status": # Status: SUCCEEDED, FAILED, CREATED, PENDING, RUNNING
|
||||
"taskid": # Task number generated by the supplier; if failed, taskid is meaningless
|
||||
"usage": # Valid when status==SUCCEEDED, billing information
|
||||
"image": # Video cover URL
|
||||
"video": # Video URL
|
||||
}
|
||||
```
|
||||
|
||||
Return example:
|
||||
```
|
||||
{
|
||||
"usage": { # Billing varies by supplier and model
|
||||
"action": "t2v",
|
||||
"credits": 10,
|
||||
"type": "text2video",
|
||||
"model": "viduq3-pro",
|
||||
"resolution": "540p",
|
||||
"off_peak": false,
|
||||
"duration": 1
|
||||
},
|
||||
"image": "https://opencomputing.ai/idfile?path=/tmp/19/43/137/39/cover.jpeg",
|
||||
"video": "https://opencomputing.ai/idfile?path=/tmp/137/173/31/47/video.mp4",
|
||||
"status": "SUCCEEDED"
|
||||
}
|
||||
```
|
||||
|
||||
### Example
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/tasks?taskid=<taskid> \
|
||||
-H "Authorization: Bearer <your-apikey-from-opencomputing.ai>"
|
||||
```
|
||||
|
||||
## Error Information
|
||||
|
||||
* 401: {"error": "Invalid API Key"}
|
||||
* 400: {"error": "Missing required parameter: prompt"}
|
||||
* 429: {"error": "Insufficient balance"}
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
# 元境プラットフォーム API 仕様書
|
||||
|
||||
元境プラットフォームは、OpenAI プロトコルと互換性のある API を提供します。下流システムで API を利用するには、以下の手順が必要です。
|
||||
* アカウント登録
|
||||
* ログイン
|
||||
* APIKEY の申請
|
||||
* チャージ
|
||||
|
||||
## 1. APIKEY の申請
|
||||
元境プラットフォーム (https://ai.opencomputing.cn) に携帯番号でログインし、「APIKEY 作成」を選択します。
|
||||
|
||||
## 2. チャージ
|
||||
プラットフォーム上でチャージが可能です。現在、Alipay(支付宝)をサポートしています。
|
||||
|
||||
## 3. API 接続情報
|
||||
* **ベース URL:** https://opencomputing.ai
|
||||
|
||||
### OpenAI 互換インターフェース
|
||||
* パス: /llmage/v1/chat/completions
|
||||
* メソッド: POST
|
||||
* ヘッダー:
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>"
|
||||
}
|
||||
|
||||
## 4. タスク状態の照会
|
||||
* パス: /llmage/tasks
|
||||
* メソッド: GET
|
||||
* ステータス: SUCCEEDED (成功), FAILED (失敗), CREATED, PENDING, RUNNING。
|
||||
204
wwwroot/public/api/api_jp.md
Normal file
204
wwwroot/public/api/api_jp.md
Normal file
@ -0,0 +1,204 @@
|
||||
# 元境プラットフォーム API
|
||||
|
||||
元境(Yuanjing)プラットフォームは、下位システム向けに OpenAI インターフェースプロトコルと互換性のある API を提供します。API を有効にするには、以下の手順に従ってください:
|
||||
* アカウント登録
|
||||
* ログイン
|
||||
* APIKEY の申請
|
||||
* チャージ(入金)
|
||||
|
||||
上記の手順完了後、以下の例に従ってテキスト生成、テキストから動画(T2V)、画像から動画(I2V)、リファレンスから動画(R2V)の推論サービスを実装できます。
|
||||
|
||||
サポートされているモデルについては、「モデル広場(Model Square)」をご参照ください。
|
||||
|
||||
## APIKEY の申請
|
||||
|
||||
ユーザーは元境プラットフォーム(https://ai.opencomputing.cn)に携帯電話でログインし、「APIKEYの作成(创建APIKEY)」をクリックする必要があります。
|
||||
|
||||
情報を入力して送信すると、APIKEY の作成が完了します。
|
||||
|
||||
「apikeyをコピー(复制apikey)」をクリックし、ポップアップウィンドウに表示された APIKEY をコピーしてください。
|
||||
|
||||
## チャージ
|
||||
ユーザーは元境プラットフォーム上でチャージを行う必要があります。現在、Alipay(支付宝)に対応しています。
|
||||
|
||||
## 現在の残高確認
|
||||
|
||||
* ユーザーログイン
|
||||
* ユーザーメニューを呼び出す
|
||||
* 「財務(财务)」をクリック
|
||||
|
||||
## API ベース URL
|
||||
https://opencomputing.ai
|
||||
|
||||
## OpenAI 互換インターフェース
|
||||
OpenAI と互換性のある一連の API を提供しています。
|
||||
|
||||
### テキスト生成
|
||||
* パス: /llmage/v1/chat/completions
|
||||
* メソッド: 'POST'
|
||||
* ヘッダー
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>" # 元境プラットフォームから申請したAPIKEY
|
||||
}
|
||||
```
|
||||
* データ
|
||||
{
|
||||
"model": # モデル識別コード(プロバイダーから提供されたモデル名)
|
||||
"prompt": # プロンプト(必須入力)
|
||||
"sys_prompt" # システムプロンプト(任意)
|
||||
"stream" # ストリーミング出力スイッチ
|
||||
"..." # その他のパラメータ
|
||||
}
|
||||
|
||||
* レスポンス
|
||||
OpenAI プロトコルに準拠したストリーミングまたは非ストリーミングの結果を返します。
|
||||
|
||||
* ストリーミング:
|
||||
```
|
||||
./oc.curl 你是谁
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"logprobs": null, "index": 0, "delta": {"content": "", "role": "assistant"}}], "model": "qwen3-max", "reasoning_content": null, "content": "", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
...
|
||||
data: [DONE]
|
||||
```
|
||||
|
||||
* 非ストリーミング
|
||||
```
|
||||
./oc.curl 你是谁
|
||||
{"id": "chatcmpl-eea7abb9-24d5-9f70-b6f6-d7da4f22a8b8", "object": "chat.completion", "created": 1775011902, "choices": [{"finish_reason": "stop", "index": 0, "message": {"content": "我是通义千问...", "role": "assistant"}}], "model": "qwen3-max", "usage": {"total_tokens": 70}}
|
||||
```
|
||||
|
||||
## テキストから動画 (Text-to-Video)
|
||||
現在サポートされているモデル:
|
||||
| モデルID | プロバイダー | モデル名 |
|
||||
|--------|--------|--------|
|
||||
| o5vfXYD5BURJWRTWpopE5 | Alibaba Cloud | happyhorse-1.0-t2v |
|
||||
| YjjGgxO_Xma8PWsMjJvps | Doubao | doubao-seedance-2-0-260128 |
|
||||
| TWay-xd0p0pkEX-_Kuhto | We Token AI | dreamina-seedance-2-0-260128(*), dreamina-seedance-2-0-fast-260128 |
|
||||
| CrEMkFQfRCmbmopZsCqLj | Doubao | doubao-seedance-1-5-pro-251215 |
|
||||
| u9HZyfDoqU6uKI6M1BTks | Tongyi Wanxiang | wan2.6-t2v |
|
||||
| r0ill7L0s6PtBS8mkmg-7 | vidu | viduq3-pro |
|
||||
|
||||
### happyhorse-1.0-t2v アップロード要件
|
||||
| フィールド名 (Name) | タイプ | 必須 | デフォルト値 | 説明 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | モデル番号 | はい | - | - |
|
||||
| model | モデル名 | いいえ | happyhorse-1.0-t2v | - |
|
||||
| prompt | string | はい | - | プロンプト。生成したい動画の内容を記述します。 |
|
||||
| resolution | string | いいえ | `720p` | 動画サイズ(解像度)。<br>選択肢:<br>`480p`, `720p`, `1080p` |
|
||||
| ratio | string | いいえ | adaptive | アスペクト比。選択肢: adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
|
||||
| duration | integer | いいえ | `5` | 動画の長さ(秒)。<br>選択肢: 整数 |
|
||||
|
||||
### seedance 2.0 アップロード要件
|
||||
| フィールド名 (Name) | タイプ | 必須 | デフォルト値 | 説明 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | モデル番号 | はい | - | - |
|
||||
| model | モデル名 | いいえ | doubao-seedance-2-0-260128 | doubao-seedance-2-0-260128 または doubao-seedance-2-0-fast-260128 |
|
||||
| prompt | string | はい | - | プロンプト。生成したい動画の内容を記述します。 |
|
||||
| resolution | string | いいえ | `720p` | 動画解像度。<br>選択肢:<br>`480p`, `720p`, `1080p` |
|
||||
| ratio | string | いいえ | adaptive | アスペクト比。 |
|
||||
| duration | integer | いいえ | `5` | 動画の長さ(秒)。 |
|
||||
|
||||
### 万象 (Wanxiang) アップロード要件
|
||||
| フィールド名 (Name) | タイプ | 必須 | デフォルト値 | 説明 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | モデル番号 | はい | - | - |
|
||||
| prompt | string | はい | - | プロンプト。生成したい動画の内容を記述します。 |
|
||||
| negative_prompt | string | いいえ | (空) | ネガティブプロンプト。動画に含めたくない内容を記述します。 |
|
||||
| size | string | いいえ | `1920*1080` | 動画サイズ。<br>選択肢:<br>`1280*720`, `1920*1080` 等 |
|
||||
| duration | integer | いいえ | `15` | 動画の長さ(秒)。<br>選択肢: `5`, `10`, `15` |
|
||||
|
||||
### 例 (Example)
|
||||
seedance を使用した例:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer <your-apikey-from-opencomputing.ai" \
|
||||
-d '{
|
||||
"llmid": "CrEMkFQfRCmbmopZsCqLj",
|
||||
"prompt": "小猫在抓老鼠",
|
||||
"duration": 5,
|
||||
"ratio": "16:9",
|
||||
"resolution": "480p"
|
||||
}'
|
||||
```
|
||||
|
||||
## 画像から動画 (Image-to-Video)
|
||||
### 快乐马 (Happy Horse) アップロード要件
|
||||
最初のフレームからの動画生成のみサポートしています。
|
||||
| フィールド名 (Name) | タイプ | 必須 | デフォルト値 | 説明 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| image1_file | 画像ファイル | はい | - | 最初のフレーム画像。 |
|
||||
| resolution | string | いいえ | `720p` | 解像度。`720P`, `1080P` |
|
||||
|
||||
例:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Authorization: Bearer <your-apikey>" \
|
||||
-F "llmid=o5vfXYD5BURJWRTWpopE5" \
|
||||
-F "prompt=一起来调科目三" \
|
||||
-F "duration=15" \
|
||||
-F "resolution=720P" \
|
||||
-F "image1_file=@./02.jpg"
|
||||
```
|
||||
|
||||
## リファレンスから動画 (Reference-to-Video)
|
||||
### seedance 2.0 アップロード要件
|
||||
| フィールド名 | タイプ | 必須 | デフォルト値 | 説明 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| image_files | 配列 | はい | [] | リファレンス画像配列。 |
|
||||
| video_files | 配列 | いいえ | [] | リファレンス動画配列。 |
|
||||
|
||||
## タスク送信
|
||||
* パス: /llmage/video
|
||||
* メソッド: POST
|
||||
* ヘッダー
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>" # 元境プラットフォームから申請したAPIKEY
|
||||
}
|
||||
```
|
||||
|
||||
* レスポンス
|
||||
```
|
||||
{
|
||||
"taskid": # タスクID。後の実行結果照会に使用します。
|
||||
"status": # 状態: SUCCEEDED, FAILED, CREATED, PENDING, RUNNING
|
||||
}
|
||||
```
|
||||
|
||||
## タスク状態の照会
|
||||
* パス: /llmage/tasks
|
||||
* メソッド: GET
|
||||
* ヘッダー
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>"
|
||||
}
|
||||
```
|
||||
* パラメータ
|
||||
```
|
||||
{
|
||||
"taskid": "936759404378734592"
|
||||
}
|
||||
```
|
||||
* レスポンス
|
||||
```
|
||||
{
|
||||
"status": # 状態
|
||||
"usage": # status==SUCCEEDED時に有効。課金情報。
|
||||
"image": # 動画カバーURL
|
||||
"video": # 動画URL
|
||||
}
|
||||
```
|
||||
|
||||
## エラーメッセージ
|
||||
|
||||
* 401: {"error": "Invalid API Key"} (無効なAPIキー)
|
||||
* 400: {"error": "Missing required parameter: prompt"} (必須パラメータ不足)
|
||||
* 429: {"error": "Insufficient balance"} (残高不足)
|
||||
206
wwwroot/public/api/api_ko.md
Executable file → Normal file
206
wwwroot/public/api/api_ko.md
Executable file → Normal file
@ -1,30 +1,204 @@
|
||||
# 원경(Yuanjing) 플랫폼 API 규격서
|
||||
# 원경(Yuanjing) 플랫폼 API
|
||||
|
||||
원경 플랫폼은 하위 시스템을 위해 OpenAI 인터페이스 프로토콜과 호환되는 API를 제공합니다.
|
||||
원경 플랫폼은 하위 시스템을 위해 OpenAI 인터페이스 프로토콜과 호환되는 API를 제공합니다. API를 활성화하려면 하위 시스템에서 다음 단계를 수행해야 합니다:
|
||||
* 계정 등록
|
||||
* 로그인
|
||||
* APIKEY 신청
|
||||
* 충전
|
||||
|
||||
## 1. APIKEY 신청
|
||||
사용자는 원경 플랫폼(https://ai.opencomputing.cn)에서 휴대폰으로 로그인한 후 "APIKEY 생성"을 클릭합니다.
|
||||
위 단계를 완료하면 다음 예시에 따라 텍스트 생성, 텍스트 기반 비디오(T2V), 이미지 기반 비디오(I2V), 참조 기반 비디오(R2V) 추론 서비스를 구현할 수 있습니다.
|
||||
|
||||
## 2. 충전
|
||||
사용자는 플랫폼에서 충전할 수 있으며, 현재 Alipay(알리페이)를 지원합니다.
|
||||
원경 플랫폼에서 지원하는 모델은 '모델 광장(Model Square)'을 참조하십시오.
|
||||
|
||||
## 3. API 연동 정보
|
||||
* **Base URL:** https://opencomputing.ai
|
||||
## APIKEY 신청
|
||||
|
||||
### OpenAI 호환 인터페이스
|
||||
* 경로(Path): /llmage/v1/chat/completions
|
||||
* 메서드(Method): POST
|
||||
* 헤더(Headers):
|
||||
사용자는 원경 플랫폼(https://ai.opencomputing.cn)에 모바일로 로그인한 후 "APIKEY 생성(创建APIKEY)"을 클릭해야 합니다.
|
||||
|
||||
정보를 입력하고 제출하면 APIKEY 생성이 완료됩니다.
|
||||
|
||||
"apikey 복사(复制apikey)"를 클릭하여 팝업 창에 표시된 apikey를 복사하십시오.
|
||||
|
||||
## 충전
|
||||
사용자는 원경 플랫폼에서 충전을 진행해야 합니다. 현재 Alipay(알리페이)를 지원합니다.
|
||||
|
||||
## 현재 잔액 확인
|
||||
|
||||
* 사용자 로그인
|
||||
* 사용자 메뉴 호출
|
||||
* '재무(财务)' 클릭
|
||||
|
||||
## API 기본 URL
|
||||
https://opencomputing.ai
|
||||
|
||||
## OpenAI 호환 인터페이스
|
||||
OpenAI와 호환되는 일련의 API를 제공합니다.
|
||||
|
||||
### 텍스트 생성
|
||||
* 경로: /llmage/v1/chat/completions
|
||||
* 메서드: 'POST'
|
||||
* 헤더
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>" # 원경 플랫폼에서 신청한 APIKEY
|
||||
}
|
||||
```
|
||||
* 데이터
|
||||
{
|
||||
"model": # 모델 식별 코드 (공급업체가 제공한 모델 이름)
|
||||
"prompt": # 프롬프트 (필수 입력)
|
||||
"sys_prompt" # 시스템 프롬프트 (선택 사항)
|
||||
"stream" # 스트림 출력 스위치
|
||||
"..." # 기타 매개변수
|
||||
}
|
||||
|
||||
* 반환값
|
||||
OpenAI 프로토콜을 준수하는 스트리밍 또는 비스트리밍 결과를 반환합니다.
|
||||
|
||||
* 스트리밍:
|
||||
```
|
||||
./oc.curl 你是谁
|
||||
data: {"id": "chatcmpl-2665dfd8-e05f-9d7f-adff-3c53c174a454", "object": "chat.completion.chunk", "created": 1775019761, "choices": [{"logprobs": null, "index": 0, "delta": {"content": "", "role": "assistant"}}], "model": "qwen3-max", "reasoning_content": null, "content": "", "finish": "0", "llmusageid": "K9_veNBxeqvrFfbGWXs0R"}
|
||||
...
|
||||
data: [DONE]
|
||||
```
|
||||
|
||||
* 비스트리밍
|
||||
```
|
||||
./oc.curl 你是谁
|
||||
{"id": "chatcmpl-eea7abb9-24d5-9f70-b6f6-d7da4f22a8b8", "object": "chat.completion", "created": 1775011902, "choices": [{"finish_reason": "stop", "index": 0, "message": {"content": "我是通义千问...", "role": "assistant"}}], "model": "qwen3-max", "usage": {"total_tokens": 70}}
|
||||
```
|
||||
|
||||
## 텍스트 기반 비디오 (Text-to-Video)
|
||||
현재 지원되는 모델:
|
||||
| 모델 ID | 제공사 | 모델 이름 |
|
||||
|--------|--------|--------|
|
||||
| o5vfXYD5BURJWRTWpopE5 | Alibaba Cloud | happyhorse-1.0-t2v |
|
||||
| YjjGgxO_Xma8PWsMjJvps | Doubao | doubao-seedance-2-0-260128 |
|
||||
| TWay-xd0p0pkEX-_Kuhto | We Token AI | dreamina-seedance-2-0-260128(*), dreamina-seedance-2-0-fast-260128 |
|
||||
| CrEMkFQfRCmbmopZsCqLj | Doubao | doubao-seedance-1-5-pro-251215 |
|
||||
| u9HZyfDoqU6uKI6M1BTks | Tongyi Wanxiang | wan2.6-t2v |
|
||||
| r0ill7L0s6PtBS8mkmg-7 | vidu | viduq3-pro |
|
||||
|
||||
### happyhorse-1.0-t2v 업로드 요구 사항
|
||||
| 필드명 (Name) | 유형 | 필수 여부 | 기본값 | 설명 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | 모델 번호 | 예 | - | - |
|
||||
| model | 모델 이름 | 아니요 | happyhorse-1.0-t2v | - |
|
||||
| prompt | string | 예 | - | 프롬프트. 생성하려는 비디오 내용을 설명합니다. |
|
||||
| resolution | string | 아니요 | `720p` | 비디오 해상도.<br>선택 가능 값:<br>`480p`, `720p`, `1080p` |
|
||||
| ratio | string | 아니요 | adaptive | 화면 비율. 선택 가능 값: adaptive, 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
|
||||
| duration | integer | 아니요 | `5` | 비디오 길이(초).<br>선택 가능 값: 정수 |
|
||||
|
||||
### seedance 2.0 업로드 요구 사항
|
||||
| 필드명 (Name) | 유형 | 필수 여부 | 기본값 | 설명 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | 모델 번호 | 예 | - | - |
|
||||
| model | 모델 이름 | 아니요 | doubao-seedance-2-0-260128 | doubao-seedance-2-0-260128 또는 doubao-seedance-2-0-fast-260128 |
|
||||
| prompt | string | 예 | - | 프롬프트. 생성하려는 비디오 내용을 설명합니다. |
|
||||
| resolution | string | 아니요 | `720p` | 비디오 해상도. |
|
||||
| ratio | string | 아니요 | adaptive | 화면 비율. |
|
||||
| duration | integer | 아니요 | `5` | 비디오 길이(초). |
|
||||
|
||||
### 완샹(Wanxiang) 업로드 요구 사항
|
||||
| 필드명 (Name) | 유형 | 필수 여부 | 기본값 | 설명 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| llmid | 모델 번호 | 예 | - | - |
|
||||
| prompt | string | 예 | - | 프롬프트. 생성하려는 비디오 내용을 설명합니다. |
|
||||
| negative_prompt | string | 아니요 | (비어 있음) | 부정 프롬프트. 비디오에 포함되지 않기를 바라는 내용을 설명합니다. |
|
||||
| size | string | 아니요 | `1920*1080` | 비디오 크기.<br>선택 가능 값:<br>`1280*720`, `1920*1080` 등 |
|
||||
| duration | integer | 아니요 | `15` | 비디오 길이(초).<br>선택 가능 값: `5`, `10`, `15` |
|
||||
|
||||
### 예시 (Example)
|
||||
seedance를 사용한 예:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer <your-apikey-from-opencomputing.ai" \
|
||||
-d '{
|
||||
"llmid": "CrEMkFQfRCmbmopZsCqLj",
|
||||
"prompt": "小猫在抓老鼠",
|
||||
"duration": 5,
|
||||
"ratio": "16:9",
|
||||
"resolution": "480p"
|
||||
}'
|
||||
```
|
||||
|
||||
## 이미지 기반 비디오 (Image-to-Video)
|
||||
### 해피호스(Happy Horse) 업로드 요구 사항
|
||||
첫 번째 프레임 기반 비디오 생성만 지원합니다.
|
||||
| 필드명 (Name) | 유형 | 필수 여부 | 기본값 | 설명 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| image1_file | 이미지 파일 | 예 | - | 첫 번째 프레임 이미지. |
|
||||
| resolution | string | 아니요 | `720p` | 해상도. `720P`, `1080P` |
|
||||
|
||||
예시:
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
curl -X POST https://opencomputing.ai/llmage/video \
|
||||
-H "Authorization: Bearer <your-apikey>" \
|
||||
-F "llmid=o5vfXYD5BURJWRTWpopE5" \
|
||||
-F "prompt=一起来调科目三" \
|
||||
-F "duration=15" \
|
||||
-F "resolution=720P" \
|
||||
-F "image1_file=@./02.jpg"
|
||||
```
|
||||
|
||||
## 참조 기반 비디오 (Reference-to-Video)
|
||||
### seedance 2.0 업로드 요구 사항
|
||||
| 필드명 | 유형 | 필수 여부 | 기본값 | 설명 |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| image_files | 배열 | 예 | [] | 참조 이미지 배열. |
|
||||
| video_files | 배열 | 아니요 | [] | 참조 비디오 배열. |
|
||||
|
||||
## 작업 제출
|
||||
* 경로: /llmage/video
|
||||
* 메서드: POST
|
||||
* 헤더
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>" # 원경 플랫폼에서 신청한 APIKEY
|
||||
}
|
||||
```
|
||||
|
||||
* 반환값
|
||||
```
|
||||
{
|
||||
"taskid": # 작업 ID. 나중에 실행 결과 조회에 사용됩니다.
|
||||
"status": # 상태: SUCCEEDED, FAILED, CREATED, PENDING, RUNNING
|
||||
}
|
||||
```
|
||||
|
||||
## 작업 상태 조회
|
||||
* 경로: /llmage/tasks
|
||||
* 메서드: GET
|
||||
* 헤더
|
||||
```
|
||||
{
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer <your-apikey>"
|
||||
}
|
||||
```
|
||||
* 매개변수
|
||||
```
|
||||
{
|
||||
"taskid": "936759404378734592"
|
||||
}
|
||||
```
|
||||
* 반환값
|
||||
```
|
||||
{
|
||||
"status": # 상태
|
||||
"usage": # status==SUCCEEDED일 때 유효. 과금 정보.
|
||||
"image": # 비디오 커버 URL
|
||||
"video": # 비디오 URL
|
||||
}
|
||||
```
|
||||
|
||||
## 4. 작업 상태 조회
|
||||
* 경로: /llmage/tasks
|
||||
* 메서드: GET
|
||||
* 상태 값: SUCCEEDED(성공), FAILED(실패), CREATED, PENDING, RUNNING.
|
||||
## 오류 메시지
|
||||
|
||||
* 401: {"error": "Invalid API Key"} (유효하지 않은 API 키)
|
||||
* 400: {"error": "Missing required parameter: prompt"} (필수 매개변수 누락)
|
||||
* 429: {"error": "Insufficient balance"} (잔액 부족)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user