Skip to content

Generate slideshow captions (AI)

POST
/public/v1/slides/caption
curl --request POST \
--url https://api.loomta.com/public/v1/slides/caption \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "userRequest": "Why indie devs love our app", "slideCount": 4, "language": "en", "slideLength": "medium" }'

Generates an overall caption plus per-slide text for a photo carousel. Spends AI credits from the workspace.

Media typeapplication/json
object
userRequest
required

What the slideshow should be about.

string
>= 1 characters <= 500 characters
slideCount
required
integer
>= 3 <= 10
language

Language for the generated text.

string
slideLength
string
default: medium
Allowed values: short medium long
Example
{
"userRequest": "Why indie devs love our app",
"slideCount": 4,
"language": "en",
"slideLength": "medium"
}

The generated caption and slides.

Media typeapplication/json
object
caption
required
string
slides
required
Array<object>
object
index
integer
caption
string
Examplegenerated
{
"caption": "example",
"slides": [
{
"index": 1,
"caption": "example"
}
]
}

The request body failed validation.

Media typeapplication/json
object
code
required

A stable, machine-readable error code to branch on.

string
message
required

A human-readable description.

string
details

Optional structured detail (for example Zod validation issues).

Example
{
"code": "invalid_request",
"message": "The request payload is invalid.",
"details": [
{
"path": [
"slideCount"
],
"message": "Number must be greater than or equal to 3"
}
]
}

The API key is missing or invalid.

Media typeapplication/json
object
code
required

A stable, machine-readable error code to branch on.

string
message
required

A human-readable description.

string
details

Optional structured detail (for example Zod validation issues).

Examples
{
"code": "missing_api_key",
"message": "A Bearer API key is required."
}

Not enough AI credits remain on the plan.

Media typeapplication/json
object
code
required

A stable, machine-readable error code to branch on.

string
message
required

A human-readable description.

string
details

Optional structured detail (for example Zod validation issues).

Example
{
"code": "insufficient_credits",
"message": "This workspace has no AI credits remaining."
}