LocalAI Config API

The config API from LocalAI — 6 operation(s) for config.

Operations 6

PATCH /api/models/config-json/{name} Partially update a model configuration
GET /api/models/config-metadata List model configuration field metadata
GET /api/models/config-metadata/autocomplete/{provider} Get dynamic autocomplete values for a config field
PUT /api/models/toggle-pinned/{name}/{action} Toggle model pinned status
POST /api/models/vram-estimate Estimate VRAM usage for a model
PUT /api/models/{name}/{action} Toggle model enabled/disabled status

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/localai-config-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 email required.

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

OpenAPI Specification

localai-config-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: The LocalAI Rest API.
  title: LocalAI Config API
  contact:
    name: LocalAI
    url: https://localai.io
  license:
    name: MIT
    url: https://raw.githubusercontent.com/mudler/LocalAI/master/LICENSE
  version: 2.0.0
servers:
- url: /
tags:
- name: config
paths:
  /api/models/config-json/{name}:
    patch:
      description: Deep-merges the JSON patch body into the existing model config
      tags:
      - config
      summary: Partially update a model configuration
      parameters:
      - description: Model name
        name: name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: success message
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /api/models/config-metadata:
    get:
      description: Returns config field metadata. Use ?section=<id> to filter by section, or omit for a section index.
      tags:
      - config
      summary: List model configuration field metadata
      parameters:
      - description: Section ID to filter (e.g. 'general', 'llm', 'parameters') or 'all' for everything
        name: section
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Section index or filtered field metadata
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /api/models/config-metadata/autocomplete/{provider}:
    get:
      description: Returns runtime-resolved values for dynamic providers (backends, models)
      tags:
      - config
      summary: Get dynamic autocomplete values for a config field
      parameters:
      - description: Provider name (backends, models, models:chat, models:tts, models:transcript, models:vad)
        name: provider
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: values array
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /api/models/toggle-pinned/{name}/{action}:
    put:
      description: Pin or unpin a model. Pinned models stay loaded and are excluded from automatic eviction.
      tags:
      - config
      summary: Toggle model pinned status
      parameters:
      - description: Model name
        name: name
        in: path
        required: true
        schema:
          type: string
      - description: 'Action: ''pin'' or ''unpin'''
        name: action
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
  /api/models/vram-estimate:
    post:
      description: Estimates VRAM based on model weight files at multiple context sizes
      tags:
      - config
      summary: Estimate VRAM usage for a model
      responses:
        '200':
          description: VRAM estimate
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/modeladmin.VRAMResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/modeladmin.VRAMRequest'
        description: VRAM estimation parameters
        required: true
  /api/models/{name}/{action}:
    put:
      description: Enable or disable a model from being loaded on demand. Disabled models remain installed but cannot be loaded.
      tags:
      - config
      summary: Toggle model enabled/disabled status
      parameters:
      - description: Model name
        name: name
        in: path
        required: true
        schema:
          type: string
      - description: 'Action: ''enable'' or ''disable'''
        name: action
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/localai.ModelResponse'
components:
  schemas:
    modeladmin.VRAMRequest:
      type: object
      properties:
        context_size:
          type: integer
        gpu_layers:
          type: integer
        kv_quant_bits:
          type: integer
        model:
          type: string
    localai.ModelResponse:
      type: object
      properties:
        config: {}
        config_revision:
          type: string
        details:
          type: array
          items:
            type: string
        error:
          type: string
        filename:
          type: string
        message:
          type: string
        pending_cleanup:
          type: integer
        success:
          type: boolean
    modeladmin.VRAMResponse:
      type: object
      properties:
        context_length:
          type: integer
        context_note:
          type: string
        model_max_context:
          type: integer
        size_bytes:
          type: integer
        size_display:
          type: string
        vram_bytes:
          type: integer
        vram_display:
          type: string
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header