For the complete documentation index, see llms.txt. This page is also available as Markdown.

Images

Create Image

post

OpenAI-compatible image generation endpoint.

Authentication modes:

  • Master key + user field: Use specified user (must exist)

  • API key + user field: Use specified user (must exist)

  • API key without user field: Use the shared "default" user

A priced response carries its cost on usage as cost_usd (a six-decimal USD string) and pricing_source, as a chat completion does; a provider that sends no usage gets one holding just those two fields. An unpriced response carries neither.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Body

OpenAI-compatible image generation request.

Fields are derived from any-llm's ImageGenerationParams (see _schema_derive) so the schema cannot silently drop a param any-llm forwards.

modelstringRequired
ninteger · nullableOptional
promptstringRequired
qualitystring · nullableOptional
response_formatstring · nullableOptional
sizestring · nullableOptional
stylestring · nullableOptional
userstring · nullableOptional
Responses
200

Successful Response

application/json
anyOptional
post/api/v1/images/generations
POST /api/v1/images/generations HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "model": "text",
  "n": 1,
  "prompt": "text",
  "quality": "text",
  "response_format": "text",
  "size": "text",
  "style": "text",
  "user": "text"
}

No content

Last updated

Was this helpful?