メインコンテンツへスキップ
POST
/
v1
/
images
/
generations
gpt-image-1 API
curl --request POST \
  --url https://api.evolink.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gpt-image-1",
  "prompt": "A beautiful colorful sunset over the ocean"
}
'
{
  "created": 1757156493,
  "id": "task-unified-1757156493-imcg5zqt",
  "model": "gpt-image-1",
  "object": "image.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 100
  },
  "type": "image",
  "usage": {
    "billing_rule": "per_call",
    "credits_reserved": 2.5,
    "user_group": "default"
  }
}

承認

Authorization
string
header
必須

すべてのAPIにBearer Token認証が必要です

APIキーの取得:

APIキー管理ページにアクセスしてAPIキーを取得してください

リクエストヘッダーに追加:

Authorization: Bearer YOUR_API_KEY

ボディ

application/json
model
enum<string>
デフォルト:gpt-image-1
必須

画像生成モデル名

利用可能なオプション:
gpt-image-1
:

"gpt-image-1"

prompt
string
必須

生成したい画像を説明するプロンプト、または入力画像の編集方法を説明するプロンプト。2000トークンまで

Maximum string length: 2000
:

"A beautiful colorful sunset over the ocean"

size
enum<string>

生成画像のサイズ、2つのフォーマットをサポート:

アスペクト比フォーマット:

  • 1:1: 正方形
  • 2:3: 縦長
  • 3:2: 横長

ピクセルフォーマット:

  • 1024x1024: 正方形
  • 1024x1536: 縦長
  • 1536x1024: 横長
利用可能なオプション:
1:1,
2:3,
3:2,
1024x1024,
1024x1536,
1536x1024
:

"1024x1024"

quality
enum<string>
デフォルト:high

生成画像の品質

サポートされる品質レベル:

  • low: 低品質、より速い生成
  • medium: 中品質
  • high: 高品質、より遅い生成(デフォルト)
利用可能なオプション:
low,
medium,
high
:

"high"

image_urls
string<uri>[]

画像から画像への変換および画像編集機能のための参照画像URLリスト

注意:

  • リクエストあたり1~16画像をサポート
  • 画像あたりの最大サイズ: 50MB
  • サポート形式: .jpeg, .jpg, .png, .webp
  • 画像URLはサーバーから直接アクセス可能であるか、直接ダウンロードをトリガーするURL(通常、.png.jpgなどの画像拡張子で終わるURL)
:
[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
n
integer
デフォルト:1

生成する画像の数、範囲は1~10

必須範囲: 1 <= x <= 10
:

1

レスポンス

画像タスクの作成に成功しました

created
integer

タスク作成タイムスタンプ

:

1757156493

id
string

タスク ID

:

"task-unified-1757156493-imcg5zqt"

model
string

使用された実際のモデル名

:

"gpt-image-1"

object
enum<string>

タスクオブジェクトタイプ

利用可能なオプション:
image.generation.task
progress
integer

タスク進捗率(0-100)

必須範囲: 0 <= x <= 100
:

0

status
enum<string>

タスクステータス

利用可能なオプション:
pending,
processing,
completed,
failed
:

"pending"

task_info
object

非同期タスク情報

type
enum<string>

タスク出力タイプ

利用可能なオプション:
text,
image,
audio,
video
:

"image"

usage
object

使用量と課金情報