メインコンテンツへスキップ
POST
/
generate
/
k
/
gpt-image-2-text-to-image
GPT Image 2 テキストから画像
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/gpt-image-2-text-to-image \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "A cute robot sitting in a field of flowers, digital art style",
  "aspect_ratio": "auto",
  "nsfw_checker": true,
  "resolution": "1K"
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}

Documentation Index

Fetch the complete documentation index at: https://docs.sinancode.com/llms.txt

Use this file to discover all available pages before exploring further.

OpenAI の GPT Image 2 モデルを使用してテキストから画像を生成します。 モデルの特徴:
  • 長いプロンプト - 最大 20000 文字のプロンプトに対応
  • 複数のアスペクト比 - auto、1:1、5:4、9:16、21:9、16:9、4:3、3:2、4:5、3:4、2:3 をサポート
  • 高解像度 - 1K / 2K / 4K 出力に対応
  • NSFW フィルタ - NSFW コンテンツチェックを選択可能(デフォルト有効)

承認

Authorization
string
header
必須

API Tokenを使用して認証を行ってください

ボディ

application/json

Task parameters

prompt
string
必須

プロンプト(必須、最大20000文字)

Required string length: 1 - 20000
:

"A cute robot sitting in a field of flowers, digital art style"

aspect_ratio
enum<string>
デフォルト:auto

アスペクト比(オプション、デフォルト auto)

利用可能なオプション:
auto,
1:1,
5:4,
9:16,
21:9,
16:9,
4:3,
3:2,
4:5,
3:4,
2:3
:

"auto"

nsfw_checker
boolean
デフォルト:true

NSFW チェック(オプション、デフォルト true)

:

true

resolution
enum<string>
デフォルト:1K

解像度(オプション、デフォルト 1K)

利用可能なオプション:
1K,
2K,
4K
:

"1K"

レスポンス

OK

task_id
string
必須

タスクID

:

"01234567-89ab-cdef-0123-456789abcdef"