메인 콘텐츠로 건너뛰기
POST
/
v1
/
images
/
generations
curl --request POST \
  --url 'https://api.elkapi.com/v1/images/generations' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
  "model": "gpt-image-1.5",
  "size": "1024x1024",
  "stream": false
}'
{
  "created": 1,
  "data": [
    {
      "b64_json": "b64_json",
      "url": "https://example.com/image.png"
    }
  ],
  "usage": {
    "total_tokens": 1,
    "input_tokens": 1,
    "output_tokens": 1,
    "input_tokens_details": {
      "text_tokens": 1,
      "image_tokens": 1
    }
  }
}

Documentation Index

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

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

curl --request POST \
  --url 'https://api.elkapi.com/v1/images/generations' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "햇살이 비치는 정원에서 달리는 작은 고양이, 영화적인 느낌, 높은 디테일",
  "model": "gpt-image-1.5",
  "size": "1024x1024",
  "stream": false
}'
{
  "created": 1,
  "data": [
    {
      "b64_json": "b64_json",
      "url": "https://example.com/image.png"
    }
  ],
  "usage": {
    "total_tokens": 1,
    "input_tokens": 1,
    "output_tokens": 1,
    "input_tokens_details": {
      "text_tokens": 1,
      "image_tokens": 1
    }
  }
}

Authorizations

Authorization
string
필수
모든 엔드포인트는 Bearer Token 인증이 필요합니다.요청 헤더에 추가하세요:
Authorization: Bearer YOUR_API_KEY

Body

model
string
기본값:"gpt-image-1.5"
이미지 생성에 사용할 모델입니다. dall-e-2, dall-e-3, gpt-image-1 중 하나입니다. gpt-image-1 전용 파라미터를 사용하지 않는 한 기본값은 dall-e-2입니다.예시: gpt-image-1.5
prompt
string
필수
원하는 이미지에 대한 텍스트 설명입니다. 최대 길이는 gpt-image-1의 경우 32,000자, dall-e-2의 경우 1,000자, dall-e-3의 경우 4,000자입니다.
n
integer
생성할 이미지 수입니다. 1~10 사이여야 합니다. dall-e-3n=1만 지원합니다.
size
string
생성 이미지 크기입니다. gpt-image-1의 경우 1024x1024, 1536x1024(가로), 1024x1536(세로), auto(기본값) 중 하나여야 합니다. dall-e-2의 경우 256x256, 512x512, 1024x1024 중 하나여야 하며, dall-e-3의 경우 1024x1024, 1792x1024, 1024x1792 중 하나여야 합니다.
background
string
생성 이미지의 배경 투명도를 설정할 수 있습니다. 이 파라미터는 gpt-image-1에서만 지원됩니다. transparent, opaque, auto(기본값) 중 하나여야 합니다. auto를 사용하면 모델이 이미지에 가장 적합한 배경을 자동으로 결정합니다.배경이 transparent인 경우 출력 형식이 투명도를 지원해야 하므로 png(기본값) 또는 webp로 설정해야 합니다.
moderation
string
gpt-image-1이 생성한 이미지의 콘텐츠 모더레이션 수준을 제어합니다. 덜 제한적인 필터링에는 low, 기본값에는 auto를 사용합니다.
quality
string
생성 이미지의 품질입니다.
stream
string
style
string
user
string

Response

created
integer
data
array<object>
data.b64_json
string
data.url
string
필수
usage
object
usage.total_tokens
integer
필수
usage.input_tokens
integer
필수
usage.output_tokens
integer
필수
usage.input_tokens_details
object
필수
usage.input_tokens_details.text_tokens
integer
필수
usage.input_tokens_details.image_tokens
integer
필수