> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Krun API base URL: https://api.krun.ai. Authenticate server-side with `Authorization: Bearer $KRUN_API_KEY`; never put a Krun API key in browser code.
> Prefer the Python SDK in examples: `pip install krun-ai`, `from krun import Krun`. The TypeScript SDK `@krun-ai/sdk` is not published on npm yet: do not tell users to `npm install` it.
> The only question type is `choice`. `confidence` is the top-1 minus top-2 probability margin, not the probability that the answer is correct. `choice` is null when `abstain` is true.
> Usage reports `input_tokens` only. There are no output tokens.

# List models

> List the models available to your API key.



## OpenAPI

````yaml https://api.krun.ai/openapi.json get /v1/models
openapi: 3.1.0
info:
  title: Krun API
  description: >-
    Krun decision API. Authenticate with `Authorization: Bearer krun_live_...`
    from your server.
  version: 1.0.0-beta
servers:
  - url: https://api.krun.ai
    description: Production
security: []
tags:
  - name: decisions
    description: Pick one option for a context
  - name: feedback
    description: Report whether a decision was correct
  - name: models
    description: Available models
  - name: health
    description: Liveness and readiness
paths:
  /v1/models:
    get:
      tags:
        - models
      summary: List models
      description: List the models available to your API key.
      operationId: list
      responses:
        '200':
          description: Available models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelList'
        '401':
          description: UNAUTHORIZED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - api_key: []
      x-codeSamples:
        - lang: python
          label: Python SDK
          source: |
            from krun import Krun

            client = Krun()

            for model in client.models():
                print(model.id, model.status)
components:
  schemas:
    ModelList:
      type: object
      required:
        - object
        - data
      properties:
        object:
          type: string
          description: Always `list`.
        data:
          type: array
          items:
            $ref: '#/components/schemas/Model'
    ErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    Model:
      type: object
      required:
        - id
        - object
        - status
      properties:
        id:
          type: string
          example: krun-one-v0
        object:
          type: string
          description: Always `model`.
        status:
          type: string
          example: available
    ErrorDetail:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: Stable machine-readable code.
        message:
          type: string
        request_id:
          type:
            - string
            - 'null'
          example: req_0b7f7c5e9a3d4a8c9f1e2d3c4b5a6978
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_OPTIONS
        - PAYLOAD_TOO_LARGE
        - UNAUTHORIZED
        - NOT_FOUND
        - RATE_LIMITED
        - QUOTA_EXCEEDED
        - UPSTREAM_TIMEOUT
        - UPSTREAM_UNAVAILABLE
        - INFERENCE_FAILED
        - INTERNAL_ERROR
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: krun_live_...

````