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

# List a model's providers and their prices

> Every upstream provider that can serve this model, with that provider's own price
and capabilities.

`GET /v1/models` and `GET /v1/models/{model_id}` publish only the default price row —
what a bare `model` string bills at. A model routed through several providers has a
different rate on each, and resilient routing can fall back between them, so this
endpoint lists them all.

Which of them is the default is not published, by neither field nor position: it is a
routing decision we re-make freely, and naming it would invite callers to depend on a
specific upstream. Rows come back alphabetically.

Discounts are resolved per row: the caller's model-scoped, provider-scoped and
account-wide discounts all apply here, and the largest wins — so a discount attached to
one provider shows up only on that provider's row.



## OpenAPI

````yaml /api/openapi.json get /v1/models/{model_id}/providers
openapi: 3.1.0
info:
  title: MeshAPI
  description: One key, all AI models.
  version: 0.1.0
servers:
  - url: https://api.meshapi.ai
security:
  - BearerAuth: []
paths:
  /v1/models/{model_id}/providers:
    get:
      tags:
        - Models
      summary: List a model's providers and their prices
      description: >-
        Every upstream provider that can serve this model, with that provider's
        own price

        and capabilities.


        `GET /v1/models` and `GET /v1/models/{model_id}` publish only the
        default price row —

        what a bare `model` string bills at. A model routed through several
        providers has a

        different rate on each, and resilient routing can fall back between
        them, so this

        endpoint lists them all.


        Which of them is the default is not published, by neither field nor
        position: it is a

        routing decision we re-make freely, and naming it would invite callers
        to depend on a

        specific upstream. Rows come back alphabetically.


        Discounts are resolved per row: the caller's model-scoped,
        provider-scoped and

        account-wide discounts all apply here, and the largest wins — so a
        discount attached to

        one provider shows up only on that provider's row.
      operationId: list_model_providers
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            title: Model Id
        - in: header
          name: X-Mesh-Version
          required: false
          schema:
            type: string
            enum:
              - 2026-08
              - 2026-09
            default: 2026-08
          example: 2026-09
          description: >-
            Dated version of the API contract to pin this request to. Omit it
            and the request is served under `2026-08` — the oldest supported
            version, so an existing integration is never moved by a release. A
            malformed or unsupported value is rejected with `400
            invalid_api_version` rather than falling back silently. The version
            actually served is echoed as `X-Mesh-Version` on every response,
            including errors.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ModelProviderOut'
                title: Response List Model Providers
        '401':
          description: Missing or invalid credentials (user JWT or API key)
          content:
            application/json:
              example:
                error:
                  code: unauthorized
                  message: Invalid or missing API key.
                request_id: req_01ARZ3NDEKTSV4RRFFQ69G5FAV
        '403':
          description: >-
            The calling key's model policy excludes this model
            (`model_excluded`), or records no brand for it so a brand policy
            cannot be applied (`model_brand_unknown`)
          content:
            application/json:
              example:
                error:
                  code: model_excluded
                  message: >-
                    Model 'openai/gpt-4o' is excluded for this API key. Ask your
                    organization admin to allow it for this key.
                request_id: req_01ARZ3NDEKTSV4RRFFQ69G5FAV
        '404':
          description: Model not found
          content:
            application/json:
              example:
                detail: Model not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '503':
          description: >-
            The calling key's policy names a brand wildcard and the catalog
            brand map is not loaded yet — retry
          content:
            application/json:
              example:
                error:
                  code: model_policy_unavailable
                  message: Model policy cannot be evaluated right now. Please retry.
                request_id: req_01ARZ3NDEKTSV4RRFFQ69G5FAV
      security:
        - BearerAuth: []
components:
  schemas:
    ModelProviderOut:
      properties:
        provider:
          type: string
          title: Provider
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        icon_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Url
        icon_url_dark:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Url Dark
        is_free:
          type: boolean
          title: Is Free
        pricing:
          $ref: '#/components/schemas/ModelPricing'
        context_window:
          anyOf:
            - type: integer
            - type: 'null'
          title: Context Window
        standard_context_threshold:
          anyOf:
            - type: integer
            - type: 'null'
          title: Standard Context Threshold
        supports_thinking:
          type: boolean
          title: Supports Thinking
          default: false
        supports_completions_api:
          type: boolean
          title: Supports Completions Api
          default: true
        supports_responses_api:
          type: boolean
          title: Supports Responses Api
          default: false
        supports_embeddings:
          type: boolean
          title: Supports Embeddings
          default: false
        supports_tools:
          type: boolean
          title: Supports Tools
          default: false
        supports_structured_output:
          type: boolean
          title: Supports Structured Output
          default: false
        supports_system_prompt:
          type: boolean
          title: Supports System Prompt
          default: true
        supports_batching:
          type: boolean
          title: Supports Batching
          default: false
        supports_flex:
          type: boolean
          title: Supports Flex
          default: false
        supports_background_response:
          type: boolean
          title: Supports Background Response
          default: false
        supports_video_generation:
          type: boolean
          title: Supports Video Generation
          default: false
        supports_video_first_frame:
          type: boolean
          title: Supports Video First Frame
          default: false
        supports_video_last_frame:
          type: boolean
          title: Supports Video Last Frame
          default: false
        supports_video_reference_image:
          type: boolean
          title: Supports Video Reference Image
          default: false
        supports_video_reference_video:
          type: boolean
          title: Supports Video Reference Video
          default: false
        supports_video_reference_audio:
          type: boolean
          title: Supports Video Reference Audio
          default: false
        supports_video_negative_prompt:
          type: boolean
          title: Supports Video Negative Prompt
          default: false
        max_prompt_chars:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Prompt Chars
        supports_generate_audio:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Supports Generate Audio
        supports_realtime:
          type: boolean
          title: Supports Realtime
          default: false
      type: object
      required:
        - provider
        - is_free
        - pricing
      title: ModelProviderOut
      description: >-
        One upstream provider that can serve a model, with that provider's
        price.


        A model usually has several price rows — one per provider that can serve
        it — and the

        rates differ between them. `GET /v1/models` only ever publishes the
        default row (the

        price a bare `model` string bills at), so this is the only place the
        alternatives are

        visible. It carries that one row's customer-facing price and capability
        flags.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModelPricing:
      properties:
        pricing_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Pricing Unit
        prompt_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt Usd Per 1M
        completion_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Completion Usd Per 1M
        input_usd_per_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Input Usd Per Unit
        output_usd_per_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Usd Per Unit
        image_output_usd_per_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Output Usd Per Image
        request_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Usd
        long_context_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Long Context Input Usd Per 1M
        long_context_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Long Context Output Usd Per 1M
        cache_read_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Read Input Usd Per 1M
        cache_write_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Write Input Usd Per 1M
        cache_write_1h_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Write 1H Input Usd Per 1M
        cache_read_audio_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Read Audio Input Usd Per 1M
        long_context_cache_read_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Long Context Cache Read Input Usd Per 1M
        long_context_cache_write_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Long Context Cache Write Input Usd Per 1M
        batch_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Batch Input Usd Per 1M
        batch_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Batch Output Usd Per 1M
        flex_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Input Usd Per 1M
        flex_cache_read_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Cache Read Input Usd Per 1M
        flex_cache_write_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Cache Write Input Usd Per 1M
        flex_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Output Usd Per 1M
        flex_long_context_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Long Context Input Usd Per 1M
        flex_long_context_cache_read_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Long Context Cache Read Input Usd Per 1M
        flex_long_context_cache_write_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Long Context Cache Write Input Usd Per 1M
        flex_long_context_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Flex Long Context Output Usd Per 1M
        training_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Training Usd Per 1M
        fine_tuned_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Fine Tuned Input Usd Per 1M
        fine_tuned_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Fine Tuned Output Usd Per 1M
        audio_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Input Usd Per 1M
        audio_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Output Usd Per 1M
        transcription_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Transcription Usd Per 1M
        cached_audio_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cached Audio Input Usd Per 1M
        cached_text_input_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cached Text Input Usd Per 1M
        cache_hit_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Hit Usd Per 1M
        output_with_audio_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Output With Audio Usd Per 1M
        output_with_video_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Output With Video Usd Per 1M
        image_input_usd_per_image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Input Usd Per Image
        image_output_size:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Output Size
        image_output_usd_per_image_512:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Output Usd Per Image 512
        image_output_usd_per_image_1k:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Output Usd Per Image 1K
        image_output_usd_per_image_2k:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Output Usd Per Image 2K
        image_output_usd_per_image_4k:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Output Usd Per Image 4K
        video_output_usd_per_unit_360p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 360P
        video_output_usd_per_unit_480p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 480P
        video_output_usd_per_unit_540p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 540P
        video_output_usd_per_unit_720p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 720P
        video_output_usd_per_unit_768p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 768P
        video_output_usd_per_unit_1080p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 1080P
        video_output_usd_per_unit_1440p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 1440P
        video_output_usd_per_unit_4k:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output Usd Per Unit 4K
        video_output_with_video_usd_per_unit_360p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 360P
        video_output_with_video_usd_per_unit_480p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 480P
        video_output_with_video_usd_per_unit_540p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 540P
        video_output_with_video_usd_per_unit_720p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 720P
        video_output_with_video_usd_per_unit_768p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 768P
        video_output_with_video_usd_per_unit_1080p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 1080P
        video_output_with_video_usd_per_unit_1440p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 1440P
        video_output_with_video_usd_per_unit_4k:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Video Usd Per Unit 4K
        video_output_with_audio_usd_per_unit_360p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 360P
        video_output_with_audio_usd_per_unit_480p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 480P
        video_output_with_audio_usd_per_unit_540p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 540P
        video_output_with_audio_usd_per_unit_720p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 720P
        video_output_with_audio_usd_per_unit_768p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 768P
        video_output_with_audio_usd_per_unit_1080p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 1080P
        video_output_with_audio_usd_per_unit_1440p:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 1440P
        video_output_with_audio_usd_per_unit_4k:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Output With Audio Usd Per Unit 4K
        reasoning_output_usd_per_1m:
          anyOf:
            - type: string
            - type: 'null'
          title: Reasoning Output Usd Per 1M
        price_matrix:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Price Matrix
        tool_pricing:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Pricing
        effective_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Effective Date
        deprecated_date:
          anyOf:
            - type: string
            - type: 'null'
          title: Deprecated Date
        discount_pct:
          anyOf:
            - type: string
            - type: 'null'
          title: Discount Pct
          description: >-
            The largest discount active for this caller on this model, as a
            percentage. Where a discount is tied to one of several upstream
            accounts, which account serves is chosen by routing, so a given
            request may be billed less of a discount than this — or none.
        discounted:
          anyOf:
            - $ref: '#/components/schemas/ModelPricing'
            - type: 'null'
          description: >-
            The rates above with `discount_pct` applied — the best price this
            caller may be billed, not a guaranteed one (see `discount_pct`).
            Absent when no discount is active. A request served on the caller's
            own BYOK provider key is billed without the gateway discount, so
            these are the platform-served rates, and a provider-scoped discount
            is resolved against the model's default provider. `tool_pricing` is
            omitted because hosted-tool fees are charged after the discount.
      type: object
      title: ModelPricing
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) or, for the admin-keys endpoints, a
        dashboard session token — sent as `Authorization: Bearer <token>`.

````

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