Skip to content

Instantly share code, notes, and snippets.

@Bvdlaan
Last active April 27, 2025 13:36
Show Gist options
  • Save Bvdlaan/1772fe0de7ac176ea1bb355e06582910 to your computer and use it in GitHub Desktop.
Save Bvdlaan/1772fe0de7ac176ea1bb355e06582910 to your computer and use it in GitHub Desktop.
ideo yaml
openapi: 3.1.0
info:
title: Ideogram Image Generation API
description: Generate images synchronously using Ideogram's models, styles, and optional parameters.
version: 1.0.0
servers:
- url: https://api.ideogram.ai
description: Production server
paths:
/generate:
post:
security:
- apiKeyAuth: [] # 🛡️ Enforce Api-Key on POST itself!
operationId: generateImage
summary: Generate images from a text prompt.
description: Generates images synchronously based on a given prompt and optional parameters.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
image_request:
type: object
required:
- prompt
properties:
prompt:
type: string
description: Text prompt describing the image.
aspect_ratio:
type: string
description: Aspect ratio preset for the image. Should not be used with resolution.
enum:
- "ASPECT_1_1"
- "ASPECT_4_5"
- "ASPECT_3_4"
- "ASPECT_9_16"
- "ASPECT_10_16"
- "ASPECT_16_9"
- "ASPECT_16_10"
- "ASPECT_4_3"
- "ASPECT_3_2"
- "ASPECT_21_9"
model:
type: string
description: Model version to use.
enum:
- "V_1"
- "V_1_TURBO"
- "V_2"
- "V_2_TURBO"
- "V_3"
- "V_3_TURBO"
default: "V_2"
magic_prompt_option:
type: string
description: Magic prompt enhancement option.
enum:
- "AUTO"
- "ON"
- "OFF"
default: "AUTO"
seed:
type: integer
description: Random seed for image generation.
minimum: 0
maximum: 2147483647
style_type:
type: string
description: Style type for the generation (only for V_2 and higher).
enum:
- "AUTO"
- "GENERAL"
- "REALISTIC"
- "DESIGN"
- "RENDER_3D"
- "ANIME"
negative_prompt:
type: string
description: Description of elements to avoid in the generated image.
num_images:
type: integer
description: Number of images to generate (1-8).
minimum: 1
maximum: 8
default: 1
resolution:
type: string
description: Specific resolution preset (only used if aspect_ratio is not set).
color_palette:
type: object
description: Optional color palette preset.
responses:
'200':
description: Image(s) generated successfully.
content:
application/json:
schema:
type: object
properties:
created:
type: string
format: date-time
data:
type: array
items:
type: object
properties:
prompt:
type: string
resolution:
type: string
is_image_safe:
type: boolean
seed:
type: integer
url:
type: string
format: uri
style_type:
type: string
'400':
description: Bad Request - invalid input.
'401':
description: Unauthorized - invalid API key.
'422':
description: Unprocessable Entity - invalid parameters.
'429':
description: Too Many Requests - rate limit exceeded.
components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: header
name: Api-Key
schemas: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment