柔軟なパラメータ
aspect_ratio, output_format, prompt, seed を含む 4 個のドキュメント済みパラメータを設定できます。
curl -X POST https://runapi.ai/api/v1/qwen_image/text_to_image \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-text-to-image",
"prompt": "夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。"
}'
import { QwenImageClient } from "@runapi.ai/qwen-image";
const client = new QwenImageClient();
const result = await client.textToImage.run({
model: "qwen-image-text-to-image",
prompt: "夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。",
});
import os
import requests
response = requests.post(
"https://runapi.ai/api/v1/qwen_image/text_to_image",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"qwen-image-text-to-image","prompt":"夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。"}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/api/v1/qwen_image/text_to_image");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'qwen-image-text-to-image',
'prompt' => '夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。',
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.textToImage().run({"model":"qwen-image-text-to-image","prompt":"夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。"});
task.waitForResult();
require "runapi/qwen_image"
client = RunApi::QwenImage::Client.new
result = client.text_to_image.run(
model: "qwen-image-text-to-image",
prompt: "夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。"
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.textToImage.Run({"model":"qwen-image-text-to-image","prompt":"夕暮れの杭州を描いた映画のような旅行ポスターを作成し、湖面に反射する鮮明な二言語のタイトル文字を入れてください。"})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model qwen-image-text-to-image \
--endpoint text_to_image \
--wait
3 個のバージョンを利用可能
モデルを選んで、数秒で生成できます。
モデルを選んで、数秒で生成できます。
| プロバイダー | Alibaba |
| モデル ID | qwen-image-text-to-image |
| モダリティ | Image |
| タスク種別 | Asynchronous |
| API エンドポイント | /api/v1/qwen_image/text_to_image |
| 入力パラメータ | aspect_ratio, callback_url, model, output_format, prompt, seed |
| アスペクト比 | 1:1, 3:4, 9:16, 4:3, 16:9 |
| 出力形式 | png, jpeg |
| カタログ状態 | 稼働中 |
無料で登録し、ダッシュボードから qwen-image-text-to-image 用の API キーを作成します。
/api/v1/qwen_image/text_to_image に qwen-image-text-to-image のモデル ID とパラメータを指定して POST リクエストを送信します。
タスクをポーリングするかコールバックに従って、完了した qwen-image-text-to-image の結果を取得します。
aspect_ratio, output_format, prompt, seed を含む 4 個のドキュメント済みパラメータを設定できます。
1 個の公開 endpoint を提供しています: text_to_image。
非同期タスクはコールバック URL を受け付け、完了通知を送信します。
seedInteger seed for reproducible results.
promptImage generation prompt.
aspect_ratioOutput aspect ratio. (1:1, 3:4, 9:16, 4:3, 16:9)
callback_urlWebhook URL for asynchronous task updates.
output_formatOutput image format. (png, jpeg)
テキスト prompt からビジュアルアセットを作成します。
prompt に沿って既存画像を変換します。
SDK で再現可能な生成を行います。
quickstart に表示されるモデル ID を渡してください。
はい。呼び出しまたは単位ごとの従量課金です。