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

# List models

> Discover available models, their capabilities, effective limits, and price.

Check simulated before interpreting answers: simulated models return sample
results for integration testing. An empty models list means prediction is not
available in this deployment. Model IDs are opaque.



## OpenAPI

````yaml /openapi.json get /v1/models
openapi: 3.1.0
info:
  description: >-
    Synchronous structured predictions. Reuse Idempotency-Key for retries.
    Prices are USD decimal strings.
  title: D1 Prediction API
  version: 1.0.0
servers:
  - url: https://d1-staging-5gh8d.ondigitalocean.app
    description: Invited staging — simulated predictions and test credit
security:
  - APIKey: []
paths:
  /v1/models:
    get:
      tags:
        - Models
      summary: List models
      description: >-
        Discover available models, their capabilities, effective limits, and
        price.


        Check simulated before interpreting answers: simulated models return
        sample

        results for integration testing. An empty models list means prediction
        is not

        available in this deployment. Model IDs are opaque.
      operationId: models_v1_models_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsResponse'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Malformed or ambiguous JSON.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Missing, invalid, or revoked API key.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Insufficient available credit.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Account is waitlisted or suspended.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Resource not found.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: >-
            Operation conflict, in-progress request, expired replay, or
            cancellation.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Request exceeds a body, input, or model limit.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '415':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unsupported media type or content encoding.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Request validation failed or model is unavailable.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Account request, token, concurrency, or read limit exceeded.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: >-
            Unexpected service error; replay a prediction to resolve
            uncertainty.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Invalid model output; no charge is settled.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Service paused, capacity exhausted, or dependency unavailable.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Prediction deadline exceeded; replay using the same operation key.
          headers:
            Retry-After:
              description: When present, wait this many seconds before retrying.
              schema:
                minimum: 1
                type: integer
            X-Request-ID:
              description: Server request identifier for support and correlation.
              schema:
                type: string
components:
  schemas:
    ModelsResponse:
      additionalProperties: false
      properties:
        default:
          anyOf:
            - type: string
            - type: 'null'
          title: Default
        models:
          items:
            $ref: '#/components/schemas/PublicModel'
          title: Models
          type: array
      required:
        - default
        - models
      title: ModelsResponse
      type: object
    ErrorEnvelope:
      additionalProperties: false
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      title: ErrorEnvelope
      type: object
    PublicModel:
      additionalProperties: false
      properties:
        capabilities:
          items:
            enum:
              - binary
              - choice
              - score
            type: string
          title: Capabilities
          type: array
        id:
          title: Id
          type: string
        limits:
          additionalProperties:
            type: integer
          title: Limits
          type: object
        metering_version:
          title: Metering Version
          type: string
        price_usd_per_million_input_tokens:
          pattern: ^\d+\.\d{9}$
          title: Price Usd Per Million Input Tokens
          type: string
        pricing_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Pricing Version
        score:
          $ref: '#/components/schemas/ScoreSemantics'
        simulated:
          title: Simulated
          type: boolean
      required:
        - id
        - simulated
        - capabilities
        - limits
        - metering_version
        - pricing_version
        - price_usd_per_million_input_tokens
        - score
      title: PublicModel
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
        request_id:
          title: Request Id
          type: string
      required:
        - code
        - message
        - request_id
      title: ErrorDetail
      type: object
    ScoreSemantics:
      additionalProperties: false
      properties:
        maximum:
          anyOf:
            - type: integer
            - type: number
            - type: string
          title: Maximum
        minimum:
          anyOf:
            - type: integer
            - type: number
          title: Minimum
        semantics:
          title: Semantics
          type: string
      required:
        - semantics
        - minimum
        - maximum
      title: ScoreSemantics
      type: object
  securitySchemes:
    APIKey:
      scheme: bearer
      type: http

````