Support

Documentation

8.3.Image generation endpoint

8.3.Image generation endpoint

URL

POST /api/v1/aitiny/image

Parameters

All parameters are sent as form-encoded POST body fields:

prompt

Required. A text description of the image to generate.

style

Optional. An image generation style preset identifier. Use the aitiny:image:styles CLI command to list available style identifiers.

size

Optional. The image size (e.g. 1024x1024). Available sizes depend on the image generation service configured in the plugin.

aspect_ratio

Optional. The aspect ratio for the generated image (e.g. 16:9, 1:1). Availability depends on the image generation service.

Example request

POST /api/v1/aitiny/image HTTP/1.1Host: www.example.comAuthorization: Bearer your_api_token_hereX-Joomla-Token: your_api_token_hereAccept: application/vnd.api+jsonContent-Type: application/x-www-form-urlencodedprompt=a+holographic+joomla+logo+over+the+planet+earth

Response

The response follows the JSON API specification. The generated image information is returned in the attributes:

{  "links": {    "self": "https://www.example.com/api/v1/aitiny/image"  },  "data": {    "type": "plg_system_aitiny.default",    "id": "",    "attributes": {      "media": "local-images:/aitiny/abc123def456.png",      "url": "https://www.example.com/images/aitiny/abc123def456.png",      "attribs": {        "srcset": "https://...512px.png 512w, https://...256px.png 256w, https://...128px.png 128w"      },      "mediaFieldUri": "images/aitiny/abc123def456.png"    }  }}

The response includes:

  • media — The Joomla media manager URI of the saved image.

  • url — The public URL of the generated image.

  • attribs — Responsive image attributes, including a srcset with multiple resolutions (if responsive images are enabled in the plugin configuration).

  • mediaFieldUri — The URI suitable for use in Joomla media form fields.