Skip to content

Generate an AI Image

Request

Generate an AI Image through an API for downloading or adding to Dash.

Security
bearerToken
Bodyapplication/jsonrequired
promptstringrequired

Text prompt to feed into the AI image generator

Example:"Oak table and chair set out in Wes Anderson style with green wall background and birch wood floor."
referenceImageobject
aspectRatiostring

Aspect ratio of the output image from the AI image generator

Default:"1:1"
Enum:"3:7""9:16""10:16""2:3""3:4""4:5""1:1""5:4""4:3""3:2"
Example:"1:1"
promptUpsamplingboolean
Default:false
Example:false
seedinteger or null
Default:null
Example:null
safetyToleranceinteger
Default:2
Example:2
outputFormatstring
Default:"png"
Enum:"png""jpeg"
Example:"png"
numberOfImagesinteger
Default:4
Example:4
curl -i -X POST \
  https://api-v2.dash.app/ai-image-generations \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "Oak table and chair set out in Wes Anderson style with green wall background and birch wood floor.",
    "referenceImage": {
      "type": "ASSET",
      "id": "7af90a8b-7ccd-430f-a85d-e8614015bc47"
    },
    "aspectRatio": "1:1",
    "promptUpsampling": false,
    "seed": null,
    "safetyTolerance": 2,
    "outputFormat": "png",
    "numberOfImages": 4
  }'

Responses

Success

Bodyapplication/json
resultobject
permittedActionsArray of objects

Actions the user is allowed to perform

Response
{ "result": { "imageUrls": [] }, "permittedActions": [ {} ] }