Mithril pricing API

The pricing API from Mithril — 2 operation(s) for pricing.

Operations 2

GET /v2/pricing/current Get Current Prices V2 #
GET /v2/pricing/history Get Historical Prices V2 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mithril-pricing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mithril-pricing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mithril API Keys Pricing API
  description: Mithril Compute API
  version: 1.0.0
servers:
- url: https://api.mithril.ai
tags:
- name: pricing
paths:
  /v2/pricing/current:
    get:
      tags:
      - pricing
      summary: Get Current Prices V2
      description: 'Get current pricing information for an instance type.


        Returns the current spot price, reserved price, and minimum price for a given

        instance type, optionally filtered by region.'
      operationId: get_current_prices_v2_v2_pricing_current_get
      security:
      - MithrilAPIKey: []
      parameters:
      - name: instance_type
        in: query
        required: true
        schema:
          type: string
          title: Instance Type
      - name: region
        in: query
        required: false
        schema:
          type: string
          examples:
          - us-central1-a
          nullable: true
      - name: instance_quantity
        in: query
        required: false
        schema:
          type: integer
          maximum: 256
          minimum: 1
          default: 1
          title: Instance Quantity
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentPricesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/pricing/history:
    get:
      tags:
      - pricing
      summary: Get Historical Prices V2
      description: 'Get historical pricing information for instance types.


        Returns historical spot and reserved prices over time for instance types,

        optionally filtered by specific instance type and region.'
      operationId: get_historical_prices_v2_v2_pricing_history_get
      security:
      - MithrilAPIKey: []
      parameters:
      - name: instance_types
        in: query
        required: false
        schema:
          type: string
          nullable: true
      - name: region
        in: query
        required: false
        schema:
          type: string
          examples:
          - us-central1-a
          nullable: true
      - name: num_samples
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: -1
          default: 100
          title: Num Samples
      - name: start_time
        in: query
        required: false
        schema:
          examples:
          - '2024-01-01T00:00:00Z'
          - '2024-01-01T00:00:00+00:00'
          - '2024-01-01T00:00:00-00:00'
          type: string
          format: datetime
          nullable: true
      - name: end_time
        in: query
        required: false
        schema:
          examples:
          - '2024-01-01T00:00:00Z'
          - '2024-01-01T00:00:00+00:00'
          - '2024-01-01T00:00:00-00:00'
          type: string
          format: datetime
          nullable: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalPricesResponseModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            oneOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HistoricalPricesResponseModel:
      properties:
        series:
          items:
            $ref: '#/components/schemas/HistoricalPriceSeriesModel'
          type: array
          title: Series
        complete:
          type: boolean
          title: Complete
          default: true
      type: object
      required:
      - series
      title: HistoricalPricesResponseModel
      description: Response model for historical pricing data.
    HistoricalPriceSeriesModel:
      properties:
        instance_type:
          type: string
          title: Instance Type
          examples:
          - it_abc123456
        region:
          type: string
          title: Region
        timestamps:
          items:
            type: string
            format: datetime
            examples:
            - '2024-01-01T00:00:00Z'
            - '2024-01-01T00:00:00+00:00'
            - '2024-01-01T00:00:00-00:00'
          type: array
          title: Timestamps
        spot_prices:
          items:
            type: string
          type: array
          title: Spot Prices
        reserved_prices:
          items:
            type: string
          type: array
          title: Reserved Prices
        region_disabled:
          type: boolean
          title: Region Disabled
          default: false
      type: object
      required:
      - instance_type
      - region
      - timestamps
      - spot_prices
      - reserved_prices
      title: HistoricalPriceSeriesModel
      description: A single time-series of prices for one instance type in one region.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CurrentPricesResponse:
      properties:
        spot_price_cents:
          type: integer
          nullable: true
        reserved_price_cents:
          type: integer
          nullable: true
        minimum_price_cents:
          type: integer
          nullable: true
        lowest_allocated_bid_cents:
          type: integer
          nullable: true
        dynamic_win_price_cents:
          type: integer
          nullable: true
        available_capacity:
          type: integer
          nullable: true
        total_capacity:
          type: integer
          nullable: true
      type: object
      title: CurrentPricesResponse
  securitySchemes:
    MithrilAPIKey:
      type: http
      scheme: bearer
      bearerFormat: fkey_<key>