Ai Generate an image with AI and store it as an asset

Checks the images_generated limit, generates an image from the
prompt, saves it as a documentation asset, and returns the asset.

POST
/control-plane/api/v1/documentation/{organization_id}/{documentation_id}/ai/generate-image

Path Parameters

organization_idstringrequired

Organization ID


documentation_idstringrequired

Documentation ID


Request Body

Image prompt

Required

altstring

heightinteger

promptstringrequired

widthinteger

Example:

{
  "alt": "string",
  "height": 0,
  "prompt": "string",
  "width": 0
}

Responses

200
OK

Response Fields:

  • alt (string)

  • created_at (string)

  • documentation_id (string)

  • height (integer)

  • id (string)

  • mime_type (string)

  • name (string)

  • original_name (string)

  • size (integer)

  • type (string)

  • updated_at (string)

  • url (string)

  • width (integer)

Example:

{
  "alt": "string",
  "created_at": "string",
  "documentation_id": "string",
  "height": 0,
  "id": "string",
  "mime_type": "string",
  "name": "string",
  "original_name": "string",
  "size": 0,
  "type": "image",
  "updated_at": "string",
  "url": "string",
  "width": 0
}
400
Bad Request

Example:

{
  "key": "value"
}
402
Payment Required

Example:

{
  "key": "value"
}
500
Internal Server Error

Example:

{
  "key": "value"
}
503
Service Unavailable

Example:

{
  "key": "value"
}