openapi: 3.2.0 info: title: LiteLLM Images API description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs** 👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login``` 💸 ```LiteLLM Model Cost Map```. 🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**' version: 1.102.1 tags: - name: Images paths: /openai/deployments/{model}/images/generations: post: tags: - Images summary: Image Generation operationId: image_generation_openai_deployments__model__images_generations_post security: - APIKeyHeader: [] parameters: - name: model in: path required: true schema: anyOf: - type: string - type: 'null' title: Model responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /images/generations: post: tags: - Images summary: Image Generation operationId: image_generation_images_generations_post security: - APIKeyHeader: [] parameters: - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/images/generations: post: tags: - Images summary: Image Generation operationId: image_generation_v1_images_generations_post security: - APIKeyHeader: [] parameters: - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /openai/deployments/{model}/images/edits: post: tags: - Images summary: Image Edit Api description: 'Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create ```bash curl -s -D >(grep -i x-request-id >&2) -o >(jq -r ''.data[0].b64_json'' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer sk-1234" -F "model=gpt-image-1" -F "image[]=@soap.png" -F ''prompt=Create a studio ghibli image of this'' ```' operationId: image_edit_api_openai_deployments__model__images_edits_post security: - APIKeyHeader: [] parameters: - name: model in: path required: true schema: anyOf: - type: string - type: 'null' title: Model requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_image_edit_api_openai_deployments__model__images_edits_post' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /images/edits: post: tags: - Images summary: Image Edit Api description: 'Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create ```bash curl -s -D >(grep -i x-request-id >&2) -o >(jq -r ''.data[0].b64_json'' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer sk-1234" -F "model=gpt-image-1" -F "image[]=@soap.png" -F ''prompt=Create a studio ghibli image of this'' ```' operationId: image_edit_api_images_edits_post security: - APIKeyHeader: [] parameters: - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_image_edit_api_images_edits_post' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/images/edits: post: tags: - Images summary: Image Edit Api description: 'Follows the OpenAI Images API spec: https://platform.openai.com/docs/api-reference/images/create ```bash curl -s -D >(grep -i x-request-id >&2) -o >(jq -r ''.data[0].b64_json'' | base64 --decode > gift-basket.png) -X POST "http://localhost:4000/v1/images/edits" -H "Authorization: Bearer sk-1234" -F "model=gpt-image-1" -F "image[]=@soap.png" -F ''prompt=Create a studio ghibli image of this'' ```' operationId: image_edit_api_v1_images_edits_post security: - APIKeyHeader: [] parameters: - name: model in: query required: false schema: anyOf: - type: string - type: 'null' title: Model requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/Body_image_edit_api_v1_images_edits_post' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: Body_image_edit_api_v1_images_edits_post: properties: image: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Image image[]: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Image[] mask: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Mask mask[]: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Mask[] type: object title: Body_image_edit_api_v1_images_edits_post Body_image_edit_api_images_edits_post: properties: image: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Image image[]: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Image[] mask: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Mask mask[]: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Mask[] type: object title: Body_image_edit_api_images_edits_post ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError Body_image_edit_api_openai_deployments__model__images_edits_post: properties: image: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Image image[]: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Image[] mask: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Mask mask[]: anyOf: - items: type: string contentMediaType: application/octet-stream type: array - type: 'null' title: Mask[] type: object title: Body_image_edit_api_openai_deployments__model__images_edits_post HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key