Ollama Responses API

Generate structured responses with optional reasoning using the OpenAI-compatible Responses API.

Operations 1

POST /responses Ollama Create response #

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-responses-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-responses-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ollama OpenAI Compatibility Responses 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: Responses
  description: Generate structured responses with optional reasoning using the OpenAI-compatible Responses API.
paths:
  /responses:
    post:
      operationId: createResponse
      summary: Ollama Create response
      description: Creates a structured response with optional reasoning. Supports streaming, tool calling, and reasoning summaries. Compatible with the OpenAI Responses API format. Added in Ollama v0.13.3.
      tags:
      - Responses
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
        '400':
          description: Bad Request
        '404':
          description: Model not found
components:
  schemas:
    UsageStats:
      type: object
      description: Token usage statistics for the request.
      properties:
        prompt_tokens:
          type: integer
          description: Number of tokens in the prompt.
        completion_tokens:
          type: integer
          description: Number of tokens in the generated completion.
        total_tokens:
          type: integer
          description: Total number of tokens used in the request.
    ResponseStreamEvent:
      type: object
      description: A streaming event from the Responses API.
      properties:
        type:
          type: string
          description: The type of streaming event.
        data:
          type: object
          description: The event data payload.
          additionalProperties: true
    OpenAIToolDefinition:
      type: object
      description: A tool definition in OpenAI-compatible format.
      required:
      - type
      - function
      properties:
        type:
          type: string
          description: The type of tool. Currently only function is supported.
          enum:
          - function
        function:
          type: object
          description: The function definition.
          required:
          - name
          properties:
            name:
              type: string
              description: The name of the function.
            description:
              type: string
              description: A description of what the function does.
            parameters:
              type: object
              description: The function parameters as a JSON Schema object.
              additionalProperties: true
    ResponseObject:
      type: object
      description: Response object from the Responses API.
      properties:
        id:
          type: string
          description: A unique identifier for the response.
        object:
          type: string
          description: The object type.
        created_at:
          type: integer
          description: Unix timestamp of when the response was created.
        model:
          type: string
          description: The model used.
        output:
          type: array
          description: The output items generated by the model.
          items:
            type: object
            additionalProperties: true
        usage:
          $ref: '#/components/schemas/UsageStats'
    ResponseRequest:
      type: object
      description: Request body for the Responses API in OpenAI-compatible format.
      required:
      - model
      - input
      properties:
        model:
          type: string
          description: The model to use for generating the response.
        input:
          description: The input to generate a response for. Can be a string or an array of input items.
          oneOf:
          - type: string
          - type: array
            items:
              type: object
              additionalProperties: true
        instructions:
          type: string
          description: System-level instructions for the model.
        tools:
          type: array
          description: A list of tools the model may call.
          items:
            $ref: '#/components/schemas/OpenAIToolDefinition'
        stream:
          type: boolean
          description: Whether to stream the response.
          default: false
        temperature:
          type: number
          description: Sampling temperature between 0 and 2.
          minimum: 0.0
          maximum: 2.0
        top_p:
          type: number
          description: Nucleus sampling parameter.
          minimum: 0.0
          maximum: 1.0
        max_output_tokens:
          type: integer
          description: Maximum number of output tokens to generate.
  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