Skip to main content
POST
/
api
/
v1
/
resources
/
generate
/
image
Generate image
curl --request POST \
  --url http://localhost:3000/api/v1/resources/generate/image \
  --header 'Content-Type: application/json' \
  --cookie nut-session= \
  --data '
{
  "prompt": "<string>",
  "width": 123,
  "height": 123,
  "model": "<string>"
}
'
{
  "success": true,
  "data": {
    "resource": {
      "filename": "<string>",
      "type": "image",
      "mimeType": "<string>",
      "size": 123,
      "description": "<string>",
      "proposalId": "<string>",
      "url": "<string>",
      "thumbnailUrl": "<string>",
      "createdAt": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

nut-session
string
cookie
required

Session cookie authentication

Body

application/json
prompt
string
required

Image generation prompt

width
integer

Image width

height
integer

Image height

model
string

AI model to use

Response

Generated image resource

success
boolean
required
data
object