靈活的參數
可設定 4 個已記錄的參數,包括 aspect_ratio, output_format, prompt, source_image_url。
curl -X POST https://runapi.ai/api/v1/qwen_2/edit_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-2-edit-image",
"image_url": "https://cdn.runapi.ai/public/samples/image.jpg",
"prompt": "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
}'
import { Qwen2Client } from "@runapi.ai/qwen-2";
const client = new Qwen2Client();
const result = await client.editImage.run({
model: "qwen-2-edit-image",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/qwen_2/edit_image",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"qwen-2-edit-image","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/qwen_2/edit_image");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen-2-edit-image',
'image_url' => 'https://cdn.runapi.ai/public/samples/image.jpg',
'prompt' => 'Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk.',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.editImage().run({"model":"qwen-2-edit-image","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."});
task.waitForResult();
require "runapi/qwen_2"
client = RunApi::Qwen2::Client.new
result = client.edit_image.run(
model: "qwen-2-edit-image",
image_url: "https://cdn.runapi.ai/public/samples/image.jpg",
prompt: "Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.editImage.Run({"model":"qwen-2-edit-image","image_url":"https://cdn.runapi.ai/public/samples/image.jpg","prompt":"Generate an isometric illustration of a cozy home office with warm lighting and plants on the desk."})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model qwen-2-edit-image \
--endpoint edit_image \
--wait
2 個版本可用
選擇任意模型,數秒內即可開始生成。
選擇任意模型,數秒內即可開始生成。
| 提供者 | Alibaba |
| 模型 ID | qwen-2-edit-image |
| 模態 | Image |
| 任務類型 | Asynchronous |
| API 端點 | /api/v1/qwen_2/edit_image |
| 計費單位 | call |
| 輸入參數 | aspect_ratio, output_format, prompt, source_image_url |
| 長寬比 | 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9 |
| 輸出格式 | jpeg, png |
| 目錄狀態 | 可正常運作 |
免費註冊後,在控制台建立 qwen-2-edit-image 的 API 金鑰。
向 /api/v1/qwen_2/edit_image 發送 POST 請求,並傳入 qwen-2-edit-image 模型 ID 和參數。
輪詢工作或按照回呼取得已完成的 qwen-2-edit-image 結果。
可設定 4 個已記錄的參數,包括 aspect_ratio, output_format, prompt, source_image_url。
開放 1 個公開 endpoint:edit_image。
按 call 計量,無需訂閱。
prompt暫無描述。
aspect_ratio暫無描述。 (1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9)
output_format暫無描述。 (jpeg, png)
source_image_url暫無描述。
自動生成適合電商 catalog、但冇 studio 攝影的 lifestyle 產品相。
在落實最終美術之前,快速構思場景同角色。
大規模生成獨特封面圖同插畫,適合 blog post 同文章。
傳入 quickstart 顯示嘅 model ID。
每個 key 的 rate limit 會按使用層級而定。請查看定價頁了解最新限制。
可以——variant 只係一個旗標。只要更改 model 參數就可以切換。
在可用 streaming 的情況下,RunAPI 會端到端串流。
可以在公開 GitHub repo 開 issue,或者電郵支援團隊。