画像(Image)
Seedream 5.0 Pro 画像生成 API
対応機能
Seedream 5.0 Pro はテキストからの画像生成と画像からの画像生成に対応しており、OpenAI Images API 互換の形式で利用できます。
モデルコードは doubao-seedream-5-0-pro です。
エンドポイントと認証
ベース URL:https://api.88api.ai
Authorization: Bearer $API_KEY
Content-Type: application/json| 用途 | リクエストメソッド | エンドポイント |
|---|---|---|
| テキストから画像生成 | POST | /v1/images/generations |
| 公開 URL の参照画像による編集 | POST | /v1/images/generations |
| ローカル画像の編集 | POST | /v1/images/edits |
テキストから画像生成
curl https://api.88api.ai/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-pro",
"prompt": "赤い唐装を着た小さな柴犬、中華モダンなイラストスタイル、お祝いムードで温かみのある雰囲気",
"n": 1,
"size": "1K",
"quality": "1K",
"response_format": "url"
}'画像から画像生成
公開 URL の参照画像
参照画像が 1 枚の場合は image、複数枚の場合は images を使用します。参照画像は公開されている HTTP(S) URL である必要があり、
両者を合わせて最大 14 枚まで指定できます。
curl https://api.88api.ai/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedream-5-0-pro",
"prompt": "人物と構図はそのままに、服装を青いアウトドアジャケットに変更する",
"image": "https://example.com/reference.jpg",
"size": "2K",
"quality": "2K",
"response_format": "url"
}'複数の参照画像を使う例:
{
"model": "doubao-seedream-5-0-pro",
"prompt": "参照画像の被写体と色彩を融合する",
"images": [
"https://example.com/reference-1.jpg",
"https://example.com/reference-2.jpg"
],
"size": "2K",
"quality": "2K"
}ローカル画像
ローカル画像は multipart リクエストで送信し、1 回につき 1 枚アップロードします:
curl https://api.88api.ai/v1/images/edits \
-H "Authorization: Bearer $API_KEY" \
-F "model=doubao-seedream-5-0-pro" \
-F "prompt=背景を明るい撮影スタジオに変更する" \
-F "image=@reference.png" \
-F "size=2K" \
-F "quality=2K" \
-F "response_format=url"リクエストパラメータ
| パラメータ | 型 | 必須 | デフォルト値 | 説明 |
|---|---|---|---|---|
model | string | はい | — | doubao-seedream-5-0-pro |
prompt | string | はい | — | 画像生成の説明文、または画像編集の指示 |
n | integer | いいえ | 1 | 1 ~ 4 |
size | string | いいえ | — | 1K または 2K |
quality | string | いいえ | — | 1K または 2K |
response_format | string | いいえ | url | url または b64_json |
image | string / file | いいえ | — | 公開参照画像の URL 1 件、または編集エンドポイントでアップロードするファイル |
images | array[string] | いいえ | — | 公開参照画像の URL 配列(最大 14 枚) |
レスポンス形式
{
"created": 1760000000,
"data": [
{
"url": "https://..."
}
],
"model": "doubao-seedream-5-0-pro"
}response_format が url の場合は data[].url を、b64_json の場合は
data[].b64_json を読み取ってください。