Images

Generate images with AI (Titan), upload existing images with automatic vision analysis, and manage your image library.

POST

Generate Image

/images/generate

Generate an image using AI based on a text prompt. Uses Amazon Titan Image Generator.

Request Parameters

knowledgeDbIdstring*Target knowledge base ID.
promptstring*Text description of the image to generate.
// POST /images/generate
{
  "knowledgeDbId": "kb_abc123",
  "prompt": "A futuristic city skyline at sunset"
}
POST

Upload Image

/images/upload

Upload an image file. The image is automatically analyzed using vision models.

Request Parameters

filefile*Image file (PNG, JPG, JPEG).
knowledgeDbIdstring*Target knowledge base ID.
// POST /images/upload
// Content-Type: multipart/form-data

FormData:
  file: <binary>
  knowledgeDbId: "kb_abc123"
GET

List Images

/images

Retrieve all images in a knowledge base.

// GET /images?knowledgeDbId=kb_abc123
// 200 OK
{
  "images": [
    {
      "imageId": "img_abc123",
      "filename": "skyline.png",
      "url": "https://...",
      "createdAt": "2026-01-15T10:30:00Z"
    }
  ],
  "count": 1
}
GET

Get Image

/images/{imageId}

Retrieve a specific image by its ID.

// GET /images/{imageId}
// 200 OK
{
  "imageId": "img_abc123",
  "filename": "skyline.png",
  "url": "https://...",
  "analysis": "The image shows...",
  "createdAt": "2026-01-15T10:30:00Z"
}
DELETE

Delete Image

/images/{imageId}

Delete an image from the knowledge base.

// DELETE /images/{imageId}
// Authorization: Bearer <idToken>
// x-api-key: <apiKey>
POST

Reindex Image

/images/reindex

Re-process and re-index an image. Useful if analysis failed or you want to refresh the embeddings.

Request Parameters

imageIdstring*ID of the image to reindex.
// POST /images/reindex
{
  "imageId": "img_abc123"
}