Add image generation documentation

- Add image generation capability page with API usage examples
- Add image-generation to docs.json navigation
- Update openapi.yaml with image generation request/response fields
  - Request: width, height, steps
  - Response: image, completed, total
This commit is contained in:
jmorganca
2026-01-22 13:51:56 -08:00
parent b5d0f72f16
commit 8b4410633d
3 changed files with 233 additions and 0 deletions

View File

@@ -117,6 +117,15 @@ components:
top_logprobs:
type: integer
description: Number of most likely tokens to return at each token position when logprobs are enabled
width:
type: integer
description: (Experimental) Width of the generated image in pixels. For image generation models only.
height:
type: integer
description: (Experimental) Height of the generated image in pixels. For image generation models only.
steps:
type: integer
description: (Experimental) Number of diffusion steps. For image generation models only.
GenerateResponse:
type: object
properties:
@@ -161,6 +170,15 @@ components:
items:
$ref: "#/components/schemas/Logprob"
description: Log probability information for the generated tokens when logprobs are enabled
image:
type: string
description: (Experimental) Base64-encoded generated image data. For image generation models only.
completed:
type: integer
description: (Experimental) Number of completed diffusion steps. For image generation streaming progress.
total:
type: integer
description: (Experimental) Total number of diffusion steps. For image generation streaming progress.
GenerateStreamEvent:
type: object
properties:
@@ -200,6 +218,15 @@ components:
eval_duration:
type: integer
description: Time spent generating tokens in nanoseconds
image:
type: string
description: (Experimental) Base64-encoded generated image data. For image generation models only.
completed:
type: integer
description: (Experimental) Number of completed diffusion steps. For image generation streaming progress.
total:
type: integer
description: (Experimental) Total number of diffusion steps. For image generation streaming progress.
ChatMessage:
type: object
required: [role, content]