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

# List available models

> Returns all AI models available for completions. OpenAI-compatible endpoint.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/models
openapi: 3.1.0
info:
  title: NEAR AI Cloud API
  description: >-
    NEAR AI Cloud API for private AI model inference and organization
    administration.
  contact:
    name: NEAR AI Team
    email: support@near.ai
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://cloud-api.near.ai
    description: NEAR AI Cloud
security:
  - session_token: []
  - api_key: []
tags:
  - name: Chat
    description: Chat completion endpoints for AI model inference
  - name: Images
    description: Image generation endpoints
  - name: Audio
    description: Audio transcription endpoints
  - name: Rerank
    description: Document reranking endpoints
  - name: Score
    description: Text similarity scoring endpoints
  - name: Privacy
    description: Privacy classification (PII span detection) endpoints
  - name: Models
    description: Public model catalog and information
  - name: Responses
    description: >-
      Stateless response inference (`store: false` only). Raw request/response
      content, response items, and history are not persisted. Clients must
      include any prior context in each request. Every successful Responses
      inference makes exactly one Chat Completions call. Only custom `function`
      tools are supported. They are client-managed: Cloud returns
      `function_call` items but never executes them; a later `store: false`
      request replays the individual call (the raw item from output is accepted)
      with its matching `function_call_output`, alongside caller-managed message
      history and the same function tool definitions. The minimal replay path
      also accepts assistant `message` text parts of type `output_text`, but not
      reasoning or arbitrary full `response.output` items. Server-executed tools
      (`web_search`, `web_context_search`, `file_search`, `code_interpreter`,
      `computer`, and remote `mcp`) and image-generation/editing models are
      rejected. The separate `POST /mcp` endpoint continues to expose its
      `web_search` tool independently of Responses; use `/v1/images/*` for image
      generation/editing. Existing completed-response gateway attestation is
      preserved best-effort: when the signature write succeeds, `GET
      /v1/signature/resp_*` retrieves signatures over SHA-256 request/response
      digests, never raw content. Interrupted streams create no `resp_*`
      attestation record or legacy disconnect fallback. Conversations, response
      history, and file input are rejected.
  - name: Organizations
    description: Organization management
  - name: Organization Members
    description: Organization member and invitation management
  - name: Workspaces
    description: Workspace and API key management
  - name: Users
    description: User profile and token management
  - name: Invitations
    description: Token-based invitation handling
  - name: Usage
    description: Usage tracking and billing information
  - name: Reporting
    description: Read-only customer usage reporting
  - name: Billing
    description: Billing costs endpoint (HuggingFace integration)
  - name: Staking Farm
    description: House of Stake farm credit configuration and synchronization
  - name: Health
    description: Health check endpoints
  - name: Attestation
    description: Attestation and verification endpoints
  - name: Gateway
    description: Model gateway integration endpoints
  - name: Admin
    description: Administrative endpoints (admin access required)
  - name: Services
    description: Public platform services (e.g. web_search pricing)
paths:
  /v1/models:
    get:
      tags:
        - Chat
      summary: List available models
      description: >-
        Returns all AI models available for completions. OpenAI-compatible
        endpoint.
      operationId: models
      responses:
        '200':
          description: List of available models
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelsResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - {}
components:
  schemas:
    ModelsResponse:
      type: object
      required:
        - object
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelInfo'
        object:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ModelInfo:
      type: object
      required:
        - id
        - object
        - created
        - owned_by
        - supported_sampling_parameters
        - supported_features
      properties:
        architecture:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ModelArchitecture'
              description: >-
                Model architecture (input/output modalities), legacy nested
                camelCase shape.
        context_length:
          type:
            - integer
            - 'null'
          format: int32
          description: Context length in tokens.
        created:
          type: integer
          format: int64
        datacenters:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Datacenter'
          description: |-
            Datacenters the model runs in (OpenRouter `datacenters`), e.g.
            `[{ "country_code": "US" }]`. Omitted when unset.
        deprecation_date:
          type:
            - string
            - 'null'
          description: >-
            OpenRouter `deprecation_date`: planned deprecation date as an ISO
            8601

            string. Omitted when there is no planned deprecation.
        description:
          type:
            - string
            - 'null'
          description: Human-readable description (OpenRouter `description`).
        hugging_face_id:
          type:
            - string
            - 'null'
          description: HuggingFace identifier (OpenRouter `hugging_face_id`).
        id:
          type: string
        input_modalities:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            OpenRouter `input_modalities`: flat snake_case duplicate of
            architecture.input.
        is_ready:
          type:
            - boolean
            - 'null'
          description: >-
            OpenRouter `is_ready`: `false` keeps the model hidden on
            OpenRouter's

            side, `true` enables auto-staging. Exposed verbatim; omitted when
            unset.
        max_output_length:
          type:
            - integer
            - 'null'
          format: int32
          description: Maximum output tokens (OpenRouter `max_output_length`).
        name:
          type:
            - string
            - 'null'
          description: Human-readable model name (OpenRouter `name`).
        object:
          type: string
        openrouter:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OpenRouter'
              description: >-
                OpenRouter slug override: `{ "slug": "<value>" }`. Present only
                when an

                override is set (our `id` does not match OpenRouter's canonical
                slug).

                Omitted entirely when unset.
        output_modalities:
          type:
            - array
            - 'null'
          items:
            type: string
          description: >-
            OpenRouter `output_modalities`: flat snake_case duplicate of
            architecture.output.
        owned_by:
          type: string
        pricing:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ModelPricing'
              description: Pricing information (HuggingFace + OpenRouter compatible).
        quantization:
          type:
            - string
            - 'null'
          description: |-
            Quantization label (OpenRouter `quantization`):
            int4/int8/fp4/fp6/fp8/fp16/bf16/fp32.
        supported_features:
          type: array
          items:
            type: string
          description: Feature capabilities (OpenRouter `supported_features`).
        supported_sampling_parameters:
          type: array
          items:
            type: string
          description: >-
            Sampling parameters accepted by the model (OpenRouter
            `supported_sampling_parameters`).
        top_provider:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TopProvider'
              description: 'OpenRouter `top_provider`: per-provider context/output limits.'
    ErrorDetail:
      type: object
      required:
        - message
        - type
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type: string
        param:
          type:
            - string
            - 'null'
        type:
          type: string
    ModelArchitecture:
      type: object
      description: Model architecture describing input/output modalities
      required:
        - inputModalities
        - outputModalities
      properties:
        inputModalities:
          type: array
          items:
            type: string
          description: >-
            Input modalities the model accepts, e.g., ["text"], ["text",
            "image"]
        outputModalities:
          type: array
          items:
            type: string
          description: Output modalities the model produces, e.g., ["text"], ["image"]
    Datacenter:
      type: object
      description: |-
        OpenRouter `datacenters` entry: a single datacenter the model runs in.

        The provider spec
        (https://openrouter.ai/docs/guides/community/for-providers) models
        `datacenters` as an array of objects, each with an ISO 3166 Alpha-2
        `country_code`. We store only the country codes (a `TEXT[]`) and
        reconstruct this object wrapper at serialization time.
      required:
        - country_code
      properties:
        country_code:
          type: string
          description: ISO 3166 Alpha-2 country code (e.g. "US"), uppercase.
    OpenRouter:
      type: object
      description: >-
        OpenRouter slug-override block.


        OpenRouter's provider spec

        (https://openrouter.ai/docs/guides/community/for-providers) requires the

        model `id` to EXACTLY match OpenRouter's canonical slug, OR for the
        provider

        to supply an explicit override via a nested `openrouter` object carrying
        the

        canonical slug. We emit this object only when an override is configured.
      required:
        - slug
      properties:
        slug:
          type: string
          description: >-
            OpenRouter's canonical slug for this model (lowercase
            `author/slug`).
    ModelPricing:
      type: object
      description: >-
        Model pricing information.


        `input` / `output` are the legacy HuggingFace-style fields (USD per
        million

        tokens, as floats). The remaining fields match OpenRouter's provider
        spec

        (USD per single token, serialized as strings to avoid float precision

        issues): https://openrouter.ai/docs/guides/community/for-providers
      required:
        - input
        - output
        - prompt
        - completion
        - image
        - request
      properties:
        completion:
          type: string
          description: 'OpenRouter: USD per output token, as a string.'
        image:
          type: string
          description: 'OpenRouter: USD per image, as a string ("0" when not applicable).'
        input:
          type: number
          format: double
          description: >-
            Price per million input tokens in USD (legacy field, kept for
            back-compat).
        input_cache_read:
          type:
            - string
            - 'null'
          description: >-
            OpenRouter: USD per cached input token, as a string. Omitted when
            cache-read

            pricing is disabled; `"0"` means cached input tokens are genuinely
            free.
        output:
          type: number
          format: double
          description: >-
            Price per million output tokens in USD (legacy field, kept for
            back-compat).
        prompt:
          type: string
          description: 'OpenRouter: USD per input token, as a string.'
        request:
          type: string
          description: 'OpenRouter: USD per request, as a string ("0" when not applicable).'
    TopProvider:
      type: object
      description: |-
        OpenRouter `top_provider` block: context length and max output tokens
        in the field names OpenRouter's `/api/v1/models` schema uses.
      required:
        - is_moderated
      properties:
        context_length:
          type:
            - integer
            - 'null'
          format: int32
          description: Context length in tokens (mirrors top-level `context_length`).
        is_moderated:
          type: boolean
          description: >-
            Whether the provider moderates content. We do not, so this is always
            false.
        max_completion_tokens:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Maximum output tokens per response (mirrors top-level
            `max_output_length`).
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token for user authentication (Authorization: Bearer
        <jwt_token>). Create via POST /users/me/access_tokens.
    api_key:
      type: http
      scheme: bearer
      bearerFormat: api_key
      description: 'API key for programmatic access (Authorization: Bearer sk-<api_key>)'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.