gpt-image-1.5-lite 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.5",
"prompt": "A beautiful colorful sunset over the ocean"
}
'import requests
url = "https://api.evolink.ai/v1/images/generations"
payload = {
"model": "gpt-image-1.5",
"prompt": "A beautiful colorful sunset over the ocean"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-image-1.5', prompt: 'A beautiful colorful sunset over the ocean'})
};
fetch('https://api.evolink.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/images/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-image-1.5',
'prompt' => 'A beautiful colorful sunset over the ocean'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A beautiful colorful sunset over the ocean\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A beautiful colorful sunset over the ocean\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A beautiful colorful sunset over the ocean\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757156493,
"id": "task-unified-1757156493-imcg5zqt",
"model": "gpt-image-1.5",
"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"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: gpt-image-1.5",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}GPT Image
GPT Image 1.5画像生成
- GPT Image 1.5(gpt-image-1.5)モデルはテキストから画像、画像から画像、画像編集モードに対応
- 非同期処理モード、返却されたタスクIDでステータスを照会
- 生成された画像リンクは24時間有効です、お早めに保存してください
POST
/
v1
/
images
/
generations
gpt-image-1.5-lite 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.5",
"prompt": "A beautiful colorful sunset over the ocean"
}
'import requests
url = "https://api.evolink.ai/v1/images/generations"
payload = {
"model": "gpt-image-1.5",
"prompt": "A beautiful colorful sunset over the ocean"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'gpt-image-1.5', prompt: 'A beautiful colorful sunset over the ocean'})
};
fetch('https://api.evolink.ai/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/images/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-image-1.5',
'prompt' => 'A beautiful colorful sunset over the ocean'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/images/generations"
payload := strings.NewReader("{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A beautiful colorful sunset over the ocean\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/images/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A beautiful colorful sunset over the ocean\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gpt-image-1.5\",\n \"prompt\": \"A beautiful colorful sunset over the ocean\"\n}"
response = http.request(request)
puts response.read_body{
"created": 1757156493,
"id": "task-unified-1757156493-imcg5zqt",
"model": "gpt-image-1.5",
"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"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: gpt-image-1.5",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}承認
すべてのAPIにBearer Token認証が必要です
APIキーの取得:
APIキー管理ページにアクセスしてAPIキーを取得してください
リクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY
ボディ
application/json
画像生成モデル名
利用可能なオプション:
gpt-image-1.5 例:
"gpt-image-1.5"
生成したい画像を説明するプロンプト、または入力画像の編集方法を説明するプロンプト。2000トークンまで
Maximum string length:
2000例:
"A beautiful colorful sunset over the ocean"
生成画像のサイズ、2つのフォーマットをサポート:
アスペクト比フォーマット:
1:1: 正方形2:3: 縦長3:2: 横長
ピクセルフォーマット:
1024x1024: 正方形1024x1536: 縦長1536x1024: 横長
利用可能なオプション:
1:1, 2:3, 3:2, 1024x1024, 1024x1536, 1536x1024 例:
"1024x1024"
生成画像の品質
サポートされる品質レベル:
low: 低品質、より速い生成medium: 中品質high: 高品質、より遅い生成(デフォルト)
利用可能なオプション:
low, medium, high 例:
"high"
画像から画像への変換および画像編集機能のための参照画像URLリスト
注意:
- リクエストあたり
1~16画像をサポート - 画像あたりの最大サイズ:
50MB - サポート形式:
.jpeg,.jpg,.png,.webp - 画像URLはサーバーから直接アクセス可能であるか、直接ダウンロードをトリガーするURL(通常、
.png、.jpgなどの画像拡張子で終わるURL)
例:
[
"https://example.com/image1.png",
"https://example.com/image2.png"
]
生成する画像の数、現在は1のみサポート
利用可能なオプション:
1 例:
1
タスク完了時のHTTPSコールバックURL
コールバックタイミング:
- タスクが完了、失敗、またはキャンセルされた時にトリガー
- 課金確認後に送信
セキュリティ制限:
- HTTPSプロトコルのみ
- 内部IPアドレスは禁止(127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x など)
- URLの長さは
2048文字以下
コールバックメカニズム:
- タイムアウト:
10秒 - 失敗後最大
3回リトライ(失敗後1/2/4秒) - コールバックレスポンス形式はタスク照会APIと一致
- 2xxステータスコードは成功とみなされ、その他のコードはリトライをトリガー
例:
"https://your-domain.com/webhooks/image-task-completed"
レスポンス
画像タスクの作成に成功しました
タスク作成タイムスタンプ
例:
1757156493
タスク ID
例:
"task-unified-1757156493-imcg5zqt"
使用された実際のモデル名
例:
"gpt-image-1.5"
タスクオブジェクトタイプ
利用可能なオプション:
image.generation.task タスク進捗率(0-100)
必須範囲:
0 <= x <= 100例:
0
タスクステータス
利用可能なオプション:
pending, processing, completed, failed 例:
"pending"
非同期タスク情報
Show child attributes
Show child attributes
タスク出力タイプ
利用可能なオプション:
text, image, audio, video 例:
"image"
使用量と課金情報
Show child attributes
Show child attributes