Ollama Models API

List, show, create, copy, pull, push, and delete models.

Operations 9

GET /api/tags Ollama List local models #
POST /api/show Ollama Show model information #
POST /api/create Ollama Create a model #
POST /api/copy Ollama Copy a model #
POST /api/pull Ollama Pull a model #
POST /api/push Ollama Push a model #
DELETE /api/delete Ollama Delete a model #
GET /models Ollama List models #
GET /models/{model} Ollama Retrieve a model #

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-models-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-models-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ollama Models API
  version: 0.1.0
  contact:
    name: Ollama Team
    url: https://ollama.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  description: 'Operations tagged Models across 2 of this provider''s published API definitions: ollama-api-openapi.yml, ollama-openai-compatibility-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:11434
  description: Local Ollama Server
- url: http://localhost:11434/v1
  description: Local Ollama Server (OpenAI-compatible)
tags:
- name: Models
  description: List, show, create, copy, pull, push, and delete models.
paths:
  /api/tags:
    get:
      operationId: listModels
      summary: Ollama List local models
      description: List all models that are available locally on the Ollama server, including their size, digest, and metadata details.
      tags:
      - Models
      responses:
        '200':
          description: Successful response with list of models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /api/show:
    post:
      operationId: showModelInfo
      summary: Ollama Show model information
      description: Show detailed information about a model including parameters, template, license, system prompt, capabilities, and model metadata.
      tags:
      - Models
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShowRequest'
      responses:
        '200':
          description: Successful response with model details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShowResponse'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /api/create:
    post:
      operationId: createModel
      summary: Ollama Create a model
      description: Create a model from an existing model with optional customizations including system prompt, template, parameters, and quantization. Streams progress updates by default.
      tags:
      - Models
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRequest'
      responses:
        '200':
          description: Model creation progress. Returns a stream of status events when streaming is enabled, or a single status response when disabled.
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/StatusEvent'
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /api/copy:
    post:
      operationId: copyModel
      summary: Ollama Copy a model
      description: Create a copy of an existing model under a new name. This creates a duplicate that can be modified independently.
      tags:
      - Models
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyRequest'
      responses:
        '200':
          description: Model successfully copied
        '404':
          description: Source model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /api/pull:
    post:
      operationId: pullModel
      summary: Ollama Pull a model
      description: Download a model from the Ollama model registry. Streams progress updates by default with status, digest, and byte transfer information.
      tags:
      - Models
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PullRequest'
      responses:
        '200':
          description: Model download progress. Returns a stream of status events when streaming is enabled, or a single status response when disabled.
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/StatusEvent'
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /api/push:
    post:
      operationId: pushModel
      summary: Ollama Push a model
      description: Upload a model to the Ollama model registry for sharing. Requires authentication. Streams progress updates by default.
      tags:
      - Models
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PushRequest'
      responses:
        '200':
          description: Model upload progress. Returns a stream of status events when streaming is enabled, or a single status response when disabled.
          content:
            application/x-ndjson:
              schema:
                $ref: '#/components/schemas/StatusEvent'
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /api/delete:
    delete:
      operationId: deleteModel
      summary: Ollama Delete a model
      description: Delete a model and its data from the local Ollama server. This permanently removes the model files from disk.
      tags:
      - Models
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteRequest'
      responses:
        '200':
          description: Model successfully deleted
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    servers:
    - url: http://localhost:11434
      description: Local Ollama Server
  /models:
    get:
      operationId: getModels
      summary: Ollama List models
      description: Lists the currently available models and provides basic information about each one. Compatible with the OpenAI List Models API format.
      tags:
      - Models
      responses:
        '200':
          description: Successful response with list of models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelListResponse'
      security:
      - bearerAuth: []
      x-operation-id-source: normalized
      x-operation-id-original: listModels
    servers:
    - url: http://localhost:11434/v1
      description: Local Ollama Server (OpenAI-compatible)
  /models/{model}:
    get:
      operationId: retrieveModel
      summary: Ollama Retrieve a model
      description: Retrieves a model instance, providing basic information about the model. Compatible with the OpenAI Retrieve Model API format.
      tags:
      - Models
      parameters:
      - name: model
        in: path
        required: true
        description: The identifier of the model to retrieve.
        schema:
          type: string
      responses:
        '200':
          description: Successful response with model information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelObject'
        '404':
          description: Model not found
      security:
      - bearerAuth: []
    servers:
    - url: http://localhost:11434/v1
      description: Local Ollama Server (OpenAI-compatible)
components:
  schemas:
    CopyRequest:
      type: object
      description: Request body for copying an existing model to a new name.
      required:
      - source
      - destination
      properties:
        source:
          type: string
          description: The name of the existing model to copy from.
        destination:
          type: string
          description: The name for the new model copy.
    StatusEvent:
      type: object
      description: A streaming status event returned during model creation, pull, or push operations.
      properties:
        status:
          type: string
          description: A human-readable status message describing the current operation step.
        digest:
          type: string
          description: The content digest associated with the current status, if applicable.
        total:
          type: integer
          description: The total number of bytes expected for the operation.
        completed:
          type: integer
          description: The number of bytes transferred so far.
    PullRequest:
      type: object
      description: Request body for downloading a model from the registry.
      required:
      - model
      properties:
        model:
          type: string
          description: The name of the model to download from the registry.
        stream:
          type: boolean
          description: When true, streams progress status events during download.
          default: true
        insecure:
          type: boolean
          description: When true, allows downloading from registries using insecure HTTP connections.
    DeleteRequest:
      type: object
      description: Request body for deleting a model from the local server.
      required:
      - model
      properties:
        model:
          type: string
          description: The name of the model to delete.
    PushRequest:
      type: object
      description: Request body for uploading a model to the registry.
      required:
      - model
      properties:
        model:
          type: string
          description: The name of the model to upload to the registry.
        stream:
          type: boolean
          description: When true, streams progress status events during upload.
          default: true
        insecure:
          type: boolean
          description: When true, allows uploading to registries using insecure HTTP connections.
    ShowResponse:
      type: object
      description: Detailed information about a model including its configuration, capabilities, and metadata.
      properties:
        modelfile:
          type: string
          description: The Modelfile content used to create this model.
        parameters:
          type: string
          description: The model parameters in string format.
        template:
          type: string
          description: The prompt template used by the model.
        system:
          type: string
          description: The system prompt embedded in the model.
        license:
          type: string
          description: The license text for the model.
        details:
          $ref: '#/components/schemas/ModelDetails'
        model_info:
          type: object
          description: Additional model metadata and architecture information.
          additionalProperties: true
        capabilities:
          type: array
          description: The list of capabilities the model supports, such as completion, tools, vision, and thinking.
          items:
            type: string
    ToolCall:
      type: object
      description: A tool call requested by the model during function calling.
      properties:
        function:
          type: object
          description: The function to call with its name and arguments.
          properties:
            name:
              type: string
              description: The name of the function to call.
            arguments:
              type: object
              description: The arguments to pass to the function as key-value pairs.
              additionalProperties: true
    CreateRequest:
      type: object
      description: Request body for creating a new model from an existing model with optional customizations.
      required:
      - model
      properties:
        model:
          type: string
          description: The name for the new model to create.
        from:
          type: string
          description: The existing model to use as a base for the new model.
        system:
          type: string
          description: A system prompt to embed in the new model.
        template:
          type: string
          description: A custom prompt template for the new model.
        license:
          description: License text or list of licenses for the new model.
          oneOf:
          - type: string
          - type: array
            items:
              type: string
        parameters:
          type: object
          description: Key-value parameters to set on the new model, such as temperature, top_k, and num_ctx.
          additionalProperties: true
        messages:
          type: array
          description: A message history to include with the new model.
          items:
            $ref: '#/components/schemas/ChatMessage'
        quantize:
          type: string
          description: The quantization level to apply to the model, such as q4_K_M or q8_0.
        stream:
          type: boolean
          description: When true, streams progress status events during creation.
          default: true
    ListResponse:
      type: object
      description: Response containing a list of all locally available models.
      properties:
        models:
          type: array
          description: The list of available models.
          items:
            $ref: '#/components/schemas/ModelSummary'
    ModelDetails:
      type: object
      description: Detailed metadata about a model's format and architecture.
      properties:
        format:
          type: string
          description: The file format of the model, such as gguf.
        family:
          type: string
          description: The primary model family, such as llama or gemma.
        families:
          type: array
          description: All model families this model belongs to.
          items:
            type: string
        parameter_size:
          type: string
          description: The parameter count label, such as 7B or 13B.
        quantization_level:
          type: string
          description: The quantization method used, such as Q4_0 or Q4_K_M.
    ErrorResponse:
      type: object
      description: An error response returned when a request fails.
      properties:
        error:
          type: string
          description: A human-readable error message describing the problem.
    ChatMessage:
      type: object
      description: A message in a chat conversation, containing a role, content, and optional images or tool calls.
      required:
      - role
      - content
      properties:
        role:
          type: string
          description: The role of the message sender.
          enum:
          - system
          - user
          - assistant
          - tool
        content:
          type: string
          description: The text content of the message.
        thinking:
          type: string
          description: The thinking content when extended thinking is enabled.
        images:
          type: array
          description: A list of base64-encoded images attached to the message for multimodal models.
          items:
            type: string
            format: byte
        tool_calls:
          type: array
          description: Tool calls requested by the assistant for function calling.
          items:
            $ref: '#/components/schemas/ToolCall'
    ShowRequest:
      type: object
      description: Request body for retrieving detailed model information.
      required:
      - model
      properties:
        model:
          type: string
          description: The name of the model to show information for.
        verbose:
          type: boolean
          description: When true, returns additional verbose metadata fields.
    ModelSummary:
      type: object
      description: Summary information about a locally available model.
      properties:
        name:
          type: string
          description: The model name identifier.
        model:
          type: string
          description: The model identifier.
        remote_model:
          type: string
          description: The upstream model name if the model is a remote reference.
        remote_host:
          type: string
          description: The upstream Ollama server URL if the model is remote.
        modified_at:
          type: string
          format: date-time
          description: The ISO 8601 timestamp when the model was last modified.
        size:
          type: integer
          description: The model size in bytes on disk.
        digest:
          type: string
          description: The SHA256 hash of the model contents.
        details:
          $ref: '#/components/schemas/ModelDetails'
    StatusResponse:
      type: object
      description: A status response returned for non-streaming model operations.
      properties:
        status:
          type: string
          description: The current status message.
    ModelListResponse:
      type: object
      description: Response containing a list of available models in OpenAI format.
      properties:
        object:
          type: string
          description: The object type, always list.
          const: list
        data:
          type: array
          description: The list of model objects.
          items:
            $ref: '#/components/schemas/ModelObject'
    ModelObject:
      type: object
      description: Information about a model in OpenAI-compatible format.
      properties:
        id:
          type: string
          description: The model identifier.
        object:
          type: string
          description: The object type, always model.
          const: model
        created:
          type: integer
          description: Unix timestamp when the model was last modified.
        owned_by:
          type: string
          description: The organization that owns the model. Defaults to library.
  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.
x-refined-from:
- ollama-api-openapi.yml
- ollama-openai-compatibility-api-openapi.yml