Aider Settings API

Aider Settings, Tokens, and Reasoning Controls.

Documentation

Specifications

Other Resources

OpenAPI Specification

aider-settings-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Aider CLI Chat Settings API
  version: 0.86.1
  description: Documentation surface for the Aider command-line interface. Aider has no hosted REST API and does not bind to a network port — it runs entirely in a developer's terminal against the local Git working tree. This OpenAPI document models the Aider command surface as if it were a REST API so it can be consumed by API-centric tooling (catalogs, registries, governance rule engines, capability runtimes). Each slash command (`/add`, `/diff`, `/commit`, etc.) is modeled as a path; each launch-flag family is modeled as a configuration path. Servers and security blocks are placeholders — aider's actual security model is "use the user's local shell credentials and the LLM provider API key in the environment."
  contact:
    name: Aider Maintainers
    url: https://github.com/Aider-AI/aider/issues
  license:
    name: Apache 2.0
    url: https://github.com/Aider-AI/aider/blob/main/LICENSE.txt
  x-generated-from: documentation
  x-last-validated: '2026-05-30'
  x-source-urls:
  - https://aider.chat/docs/usage/commands.html
  - https://aider.chat/docs/usage/modes.html
  - https://aider.chat/docs/config/options.html
  - https://aider.chat/docs/llms.html
servers:
- url: cli://aider
  description: Local CLI invocation (not a network endpoint). Modeled as URI scheme `cli://aider` for catalog tooling.
- url: file:///usr/local/bin/aider
  description: Typical install path for the `aider` entrypoint.
security:
- LLMProviderKey: []
tags:
- name: Settings
  description: Aider Settings, Tokens, and Reasoning Controls.
paths:
  /commands/tokens:
    get:
      operationId: reportTokenUsage
      summary: Aider Report Token Usage
      description: Report the number of tokens used by the current chat context. Maps to `/tokens`.
      tags:
      - Settings
      responses:
        '200':
          description: Token usage returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenUsage'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /commands/reasoning-effort:
    post:
      operationId: setReasoningEffort
      summary: Aider Set Reasoning Effort
      description: Set the reasoning effort level (low/medium/high or numeric). Maps to `/reasoning-effort`.
      tags:
      - Settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReasoningEffortRequest'
      responses:
        '200':
          description: Reasoning effort set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandResult'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /commands/think-tokens:
    post:
      operationId: setThinkingTokens
      summary: Aider Set Thinking Token Budget
      description: Set the thinking token budget (e.g., 8096, 8k, 10.5k, 0.5M). Maps to `/think-tokens`.
      tags:
      - Settings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThinkingTokensRequest'
      responses:
        '200':
          description: Thinking token budget set.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommandResult'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /commands/settings:
    get:
      operationId: showSettings
      summary: Aider Show Current Settings
      description: Print out the current settings. Maps to `/settings`.
      tags:
      - Settings
      responses:
        '200':
          description: Settings snapshot returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettingsSnapshot'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    SettingsSnapshot:
      type: object
      properties:
        main_model:
          type: string
          example: anthropic/claude-opus-4
        weak_model:
          type: string
          example: anthropic/claude-haiku-4
        editor_model:
          type: string
          example: anthropic/claude-sonnet-4
        edit_format:
          type: string
          example: diff
        auto_commits:
          type: boolean
          example: true
        auto_lint:
          type: boolean
          example: true
        auto_test:
          type: boolean
          example: false
        chat_mode:
          type: string
          example: code
        watch_files:
          type: boolean
          example: false
        stream:
          type: boolean
          example: true
    ReasoningEffortRequest:
      type: object
      required:
      - effort
      properties:
        effort:
          type: string
          description: Reasoning effort level. Accepts low|medium|high or a numeric/string budget.
          example: high
    CommandResult:
      type: object
      properties:
        ok:
          type: boolean
          example: true
        message:
          type: string
          example: Files added to chat.
    ThinkingTokensRequest:
      type: object
      required:
      - tokens
      properties:
        tokens:
          type: string
          description: Thinking token budget. Accepts integer (e.g. 8096), shorthand (8k, 10.5k, 0.5M).
          example: 32k
    TokenUsage:
      type: object
      properties:
        chat_history_tokens:
          type: integer
          example: 18412
        repo_map_tokens:
          type: integer
          example: 4096
        in_chat_files_tokens:
          type: integer
          example: 6234
        budget_remaining_tokens:
          type: integer
          example: 171258
  securitySchemes:
    LLMProviderKey:
      type: apiKey
      in: header
      name: X-Provider-API-Key
      description: Placeholder for documentation purposes. Aider does not authenticate with an "aider API"; it reads the relevant upstream provider key (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) from the local environment and passes it to the chosen LLM provider directly.