ShortGenius API
ShortGeniusDevelopers
  • Introduction
  • Quickstart
  • Authentication & Essentials
  • API reference
    • Videos
      • Draft video
      • Draft video from script
      • Draft video from URL
      • Draft quiz video
      • Draft news video
      • Create video
      • List videos
      • Get video
      • Generate video topics
    • Video series
      • Generate video topics
      • Create series
      • List series
      • Get series
    • Images
      • Create image
      • List images
      • Get image
      • Get image styles
    • Audio
      • Create speech
      • List audio
      • Get audio
      • List voices
      • Get voice
    • Music
      • List music genres
      • List music
    • Publishing
      • List connections
    • Administration
      • Get usage
      • Health check
  • Guides
    • Video Generation
    • Video Series
    • Image Generation
    • Audio Generation
    • Music
    • Publishing
    • Usage & Credits
  • Resources
    • Realtime logs
    • API keys
    • OpenAPI spec
    • TypeScript SDK
    • Python SDK
    • ShortGenius
Powered by GitBook
On this page
  1. API reference
  2. Images

Create image

PreviousImagesNextList images

Last updated 3 months ago

Create image

post

Create an image from a prompt.

Authorizations
Body

Parameters required to generate an image.

promptstringRequired

The prompt to generate the image from.

aspect_ratiostring ยท enumRequired

The aspect ratio of the image.

Possible values:
image_style_idstring | nullOptional

The ID of the image style to use. Use the List image styles endpoint to get a list of available image styles.

scene_idstring | nullOptional

If you want to add the generated image to a video scene you can specify it here.

wait_for_generationbooleanOptional

If false, this endpoint immediately returns the incomplete image record, and you can poll the Get image endpoint until the task completes. If true, this endpoint waits until the image generation completes, then returns the complete image record. Defaults to false.

Default: false
Responses
200
Successful response
application/json
400
Invalid request
application/json
401
Unauthorized request
application/json
post
POST /api/v1/images HTTP/1.1
Host: shortgenius.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 105

{
  "prompt": "text",
  "aspect_ratio": "9:16",
  "image_style_id": null,
  "scene_id": null,
  "wait_for_generation": false
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "url": null,
  "type": "text",
  "state": "pending",
  "created_at": "text",
  "updated_at": null,
  "prompt": "text",
  "is_nsfw": true,
  "aspect_ratio": "9:16",
  "image_style_id": null
}