Skip to main content

Endpoint

GET /api/suggestion
Retrieves an AI-generated prompt suggestion powered by ChatGPT. Use this endpoint to get creative ideas for image generation when you need inspiration.

Request

This endpoint does not require any parameters. Simply make a GET request to receive a suggestion.

Response

Returns a string containing the suggested prompt text.
response
string
A creative prompt suggestion generated by AI that you can use for image generation

Example request

curl -X GET https://your-domain.com/api/suggestion

Example response

"A mystical forest with glowing mushrooms and fireflies dancing in the moonlight"

Response details

The response is returned as a JSON-encoded string. The suggestion is generated fresh on each request and is not cached.

Error codes

500
error
Internal server error - The suggestion service failed to generate a prompt

Usage tips

  • Call this endpoint when users need inspiration for their image prompts
  • The suggestions are dynamically generated and will vary on each request
  • Use the returned suggestion directly with the generate image endpoint

Build docs developers (and LLMs) love