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

# Get Model Pricing

> Get what one model costs per 1M input and output tokens, including the service fee.



## OpenAPI

````yaml https://api.swarms.world/openapi.json get /v1/models/pricing
openapi: 3.1.0
info:
  title: Swarms API
  description: >-
    Swarms API provides scalable, secure orchestration for multi-agent systems.
    Access robust endpoints for managing agents and swarms, automating
    workflows, and monitoring execution. Requires an API key—see the [API Keys
    page](https://swarms.world/platform/api-keys). Refer to [Swarms API
    Documentation](https://docs.swarms.ai) for guides and details.
  version: 1.0.0
servers:
  - url: https://api.swarms.world
    description: Swarms Production API
security: []
paths:
  /v1/models/pricing:
    get:
      tags:
        - Models
      summary: Get Model Pricing
      description: >-
        Get what one model costs per 1M input and output tokens, including the
        service fee.
      operationId: get_model_pricing_v1_models_pricing_get
      parameters:
        - name: model_name
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            description: The model to price, e.g. gpt-5.4 or openrouter/moonshotai/kimi-k3.
            title: Model Name
          description: The model to price, e.g. gpt-5.4 or openrouter/moonshotai/kimi-k3.
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelPricingOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ModelPricingOutput:
      properties:
        status:
          type: string
          title: Status
          description: The status of the request.
          default: success
        model_name:
          type: string
          title: Model Name
          description: The model that was priced.
        input_cost_per_1m:
          type: number
          title: Input Cost Per 1M
          description: Price per 1M input tokens (USD), including the service fee.
        output_cost_per_1m:
          type: number
          title: Output Cost Per 1M
          description: Price per 1M output tokens (USD), including the service fee.
        price_source:
          type: string
          title: Price Source
          description: 'Where the price came from: ''openrouter'', ''litellm'' or ''fallback''.'
        timestamp:
          type: string
          title: Timestamp
          description: ISO timestamp when the price was looked up.
      type: object
      required:
        - model_name
        - input_cost_per_1m
        - output_cost_per_1m
        - price_source
        - timestamp
      title: ModelPricingOutput
      description: 'Response for GET /v1/models/pricing: one model''s price per 1M tokens.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````

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