モデル別 API ページ
Qwen Image API 連携
Rivya Public API v1 で Qwen Image を使うための model id qwen-image、対応入力、パラメータ、Files API ルール、クレジット、レスポンス例です。
API で利用可能テキストまたは URL は対応済み。参照モードでは Files API を使用画像
API モデル ID
qwen-image
入力
text, file
Files API
参照モードで必要
基本クレジット
4
機能
画像
課金
FIXED
Prompt 上限
5000 文字
リクエスト仕様
モデル ID はトップレベルに送ります。モデル固有の制御項目は params に入れます。
| Key | 型 | 必須 | デフォルト | 説明 |
|---|---|---|---|---|
| model | string | はい | qwen-image | qwen-image を API モデル ID として使用します。 |
| prompt | string | はい | - | このモデルでは最大 5000 文字です。 |
| params | object | いいえ | - | モデル固有のパラメータオブジェクトです。許可されるキーは下の行で確認してください。 |
| client_request_id | string | いいえ | - | 自社システム内でリクエストを追跡するための任意のクライアント側 ID です。 |
モデルパラメータ
| Key | 型 | 必須 | デフォルト | 範囲 | 選択肢 | 説明 |
|---|---|---|---|---|---|---|
| image_size | select | いいえ | square_hd | - | square, square_hd, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 | 画像サイズ |
| output_format | select | いいえ | png | - | png, jpeg | 出力形式 |
アップロードポリシー
先に参照ファイルをアップロードし、返された URL と durationToken を params.referenceMediaItems に入れてください。
参照ルール
参照画像: 画像プロジェクト用に最大1枚の画像ファイルをアップロードできます。
最大ファイル数
1
受け付けるファイル種別
image
Duration token
動画と音声の参照では、長さの検証が必要な場合に /api/v1/files の durationToken を含めてください。
| kind | 最大サイズ | MIME タイプ |
|---|---|---|
| image | 10 MB | image/jpeg, image/png, image/webp |
最小リクエスト
{
"model": "qwen-image",
"prompt": "A clean editorial product image on a soft studio background",
"params": {
"image_size": "square_hd",
"output_format": "png"
}
}参照ファイル付きリクエスト
{
"model": "qwen-image",
"prompt": "A clean editorial product image on a soft studio background",
"params": {
"image_size": "square_hd",
"output_format": "png",
"referenceMediaItems": [
{
"url": "https://cdn.example.com/reference-image.png",
"kind": "image",
"name": "reference-image.png",
"mimeType": "image/png"
}
]
}
}作成レスポンス
作成エンドポイントは公開タスク ID を返します。タスクが成功または失敗するまで、ステータスエンドポイントをポーリングしてください。
{
"id": "task_qwen_image_example",
"status": "queued",
"model": "qwen-image",
"reserved_credits": 4,
"final_credits": 0,
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}一般的なエラー
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
一部のモードでは Files API による参照アップロードが必要です。