Ollama Images API

Generate images from text descriptions using the OpenAI-compatible images endpoint. Experimental feature.

Operations 1

POST /images/generations Ollama Create image #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ollama-images-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ollama-images-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ollama OpenAI Compatibility Images API
  description: Ollama provides compatibility with parts of the OpenAI API, allowing existing applications built for OpenAI to connect to locally-running models through Ollama. Supported endpoints include chat completions, completions, embeddings, models, images, and the Responses API.
  version: 0.1.0
  contact:
    name: Ollama Team
    url: https://ollama.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: http://localhost:11434/v1
  description: Local Ollama Server (OpenAI-compatible)
security:
- bearerAuth: []
tags:
- name: Images
  description: Generate images from text descriptions using the OpenAI-compatible images endpoint. Experimental feature.
paths:
  /images/generations:
    post:
      operationId: createImage
      summary: Ollama Create image
      description: Creates an image given a text prompt. This is an experimental endpoint that may change or be removed. Only supports b64_json response format.
      tags:
      - Images
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
      responses:
        '200':
          description: Successful image generation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageGenerationResponse'
        '400':
          description: Bad Request
        '404':
          description: Model not found
components:
  schemas:
    ImageGenerationResponse:
      type: object
      description: Response object from an image generation request.
      properties:
        created:
          type: integer
          description: Unix timestamp of when the image was created.
        data:
          type: array
          description: The generated image data.
          items:
            type: object
            properties:
              b64_json:
                type: string
                description: The base64-encoded image data.
    ImageGenerationRequest:
      type: object
      description: Request body for generating images in OpenAI-compatible format. This is an experimental endpoint.
      required:
      - model
      - prompt
      properties:
        model:
          type: string
          description: The model to use for image generation.
        prompt:
          type: string
          description: A text description of the desired image.
        size:
          type: string
          description: The size of the generated image, such as 1024x1024.
        response_format:
          type: string
          description: The format in which the image is returned. Only b64_json is supported.
          enum:
          - b64_json
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. The key is accepted but not validated by Ollama. Use any value such as ollama.
externalDocs:
  description: Ollama OpenAI Compatibility Documentation
  url: https://docs.ollama.com/api/openai-compatibility