images
generate an image with AI
Changed onGenerate an image from a text prompt and get back a URL hosted by this Forem.
The image follows this Forem's cover image style and, unless aspect_ratio is given, is sized for its cover images. Use the URL in body_markdown or as an article's main_image, just like an uploaded image.
Limits:
- prompt is required and may be up to 1000 characters.
- Rate limited per user to a configurable number of generations per configurable window (by default 3 per day). Every attempt counts, including failed ones. Exceeding it returns 429 with a Retry-After header. Forem admins can change both values, or set the limit to 0 to disable this endpoint.
- Returns 503 if AI image generation is not configured on this Forem.
post/api/images/generate
Request
- Base URLhttps://dev.to
- Auth
- API key in header api-key
- or HTTP bearer
Request body
Response
created
Changes
- info
endpoint added
- info