Mithril Spot API

The spot API from Mithril — 5 operation(s) for spot.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/spot/bids List Spot bids · Get Bids #
Ask an LLM
“Which Spot bids have I placed across my projects?”
“Can I filter Spot bids by instance type or region?”
Tell an agent
List all my Spot bids.
List Spot bids for project {project} in region {region}.
POST /v2/spot/bids Place a Spot bid · Create Bid #
Ask an LLM
“How do I bid on Spot instances at a maximum price?”
“Can I get notified by email when my Spot bid is fulfilled?”
Tell an agent
Place a Spot bid on {instance_type} in {region} for project {project} at {limit_price}.
Bid {instance_quantity} of {instance_type} in {region} for {project} at {limit_price}, notified at {notification_email}.
GET /v2/spot/bids/{bid_fid} Get a Spot bid · Get Bid #
Ask an LLM
“What are the details of one Spot bid?”
“Can I look up a Spot bid by its FID?”
Tell an agent
Get Spot bid {bid_fid}.
Show the details of Spot bid {bid_fid}.
PATCH /v2/spot/bids/{bid_fid} Change a Spot bid's limit price · Update Bid #
Ask an LLM
“Can I raise the price of an existing Spot bid?”
“Is it possible to pause a Spot bid or change its memory limit?”
Tell an agent
Raise the limit price of Spot bid {bid_fid} to {limit_price}.
Pause Spot bid {bid_fid} by setting paused to {paused}.
DELETE /v2/spot/bids/{bid_fid} Cancel a Spot bid · Cancel Bid #
Ask an LLM
“How do I cancel a Spot bid I no longer want?”
“Can I stop a Spot bid before it is fulfilled?”
Tell an agent destructive · confirm first
Cancel Spot bid {bid_fid}.
Stop the Spot bid {bid_fid} so it is no longer competing.
GET /v2/spot/bids/{bid_fid}/status Get detailed status of a Spot bid · Get Bid Status #
Ask an LLM
“Is my Spot bid allocated yet, or is it still pre-empting?”
“What instance-level status does a Spot bid have right now?”
Tell an agent
Get the detailed status of Spot bid {bid_fid}.
Show whether Spot bid {bid_fid} is Open, Allocated, Preempting, Terminated, Paused or Relocating.
GET /v2/spot/bids/{bid_fid}/history Get the history of a Spot bid · Get Bid History #
Ask an LLM
“What events have happened to my Spot bid over time?”
“Can I see when a Spot bid was paused or its price changed?”
Tell an agent
Show the history of Spot bid {bid_fid}.
List every event on Spot bid {bid_fid}, including price changes and pausing.
GET /v2/spot/availability Check Spot availability across regions · Get Auctions #
Ask an LLM
“Which regions currently have Spot capacity available?”
“Is there Spot availability for a particular instance type right now?”
Tell an agent
Show Spot availability across all regions.
List regions where Spot instances are currently available.

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:mithril-spot-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

mithril-spot-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mithril Spot API
  description: Mithril Compute API
  version: 1.0.0
servers:
- url: https://api.mithril.ai
tags:
- name: Spot
paths:
  /v2/spot/bids:
    get:
      tags:
      - Spot
      summary: Get Bids
      description: Get all Spot bids for a project, or all user's projects if not specified
      operationId: get_bids_v2_spot_bids_get
      security:
      - MithrilAPIKey: []
      parameters:
      - name: next_cursor
        in: query
        required: false
        schema:
          nullable: true
      - name: sort_by
        in: query
        required: false
        schema:
          enum:
          - created_at
          - status
          type: string
          nullable: true
      - name: sort_dir
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/SortDirection'
          nullable: true
      - name: project
        in: query
        required: false
        schema:
          type: string
          examples:
          - proj_abc123456
          nullable: true
      - name: instance_type
        in: query
        required: false
        schema:
          type: string
          examples:
          - it_abc123456
          nullable: true
      - name: region
        in: query
        required: false
        schema:
          type: string
          examples:
          - us-central1-a
          nullable: true
      - name: status
        in: query
        required: false
        schema:
          enum:
          - Open
          - Allocated
          - Preempting
          - Terminated
          - Paused
          type: string
          nullable: true
      - name: name
        in: query
        required: false
        schema:
          type: string
          nullable: true
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          nullable: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBidsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Spot
      summary: Create Bid
      description: Place a new Spot bid
      operationId: create_bid_v2_spot_bids_post
      security:
      - MithrilAPIKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBidRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/spot/bids/{bid_fid}:
    get:
      tags:
      - Spot
      summary: Get Bid
      description: Get a single Spot bid by FID
      operationId: get_bid_v2_spot_bids__bid_fid__get
      security:
      - MithrilAPIKey: []
      parameters:
      - name: bid_fid
        in: path
        required: true
        schema:
          type: string
          title: Bid Fid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Spot
      summary: Update Bid
      description: Update the limit price of a Spot bid
      operationId: update_bid_v2_spot_bids__bid_fid__patch
      security:
      - MithrilAPIKey: []
      parameters:
      - name: bid_fid
        in: path
        required: true
        schema:
          type: string
          title: Bid Fid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBidRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Spot
      summary: Cancel Bid
      description: Cancel a Spot bid
      operationId: cancel_bid_v2_spot_bids__bid_fid__delete
      security:
      - MithrilAPIKey: []
      parameters:
      - name: bid_fid
        in: path
        required: true
        schema:
          type: string
          title: Bid Fid
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/spot/bids/{bid_fid}/status:
    get:
      tags:
      - Spot
      summary: Get Bid Status
      description: 'Get detailed status of a Spot bid.


        Returns a detailed status that includes instance-level status information.

        The status can be one of: Open, Allocated, Preempting, Terminated,

        Paused, Relocating.


        "Relocating" indicates that part of the order is being relocated.'
      operationId: get_bid_status_v2_spot_bids__bid_fid__status_get
      security:
      - MithrilAPIKey: []
      parameters:
      - name: bid_fid
        in: path
        required: true
        schema:
          type: string
          title: Bid Fid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/spot/bids/{bid_fid}/history:
    get:
      tags:
      - Spot
      summary: Get Bid History
      description: 'Get the history of events for a Spot bid.


        Returns a list of historical events including:

        - placing the bid

        - pausing the bid

        - resuming the bid

        - terminating the bid

        - changes to the limit price'
      operationId: get_bid_history_v2_spot_bids__bid_fid__history_get
      security:
      - MithrilAPIKey: []
      parameters:
      - name: bid_fid
        in: path
        required: true
        schema:
          type: string
          title: Bid Fid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BidHistoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/spot/availability:
    get:
      tags:
      - Spot
      summary: Get Auctions
      description: Get the Spot availability across all regions.
      operationId: get_auctions_v2_spot_availability_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/AuctionModel'
                type: array
                title: Response Get Auctions V2 Spot Availability Get
      security:
      - MithrilAPIKey: []
components:
  schemas:
    AuctionModel:
      properties:
        fid:
          type: string
          title: Fid
          examples:
          - auc_abc123456
        instance_type:
          type: string
          title: Instance Type
          examples:
          - it_abc123456
        region:
          type: string
          title: Region
          examples:
          - us-central1-a
        capacity:
          type: integer
          title: Capacity
          examples:
          - 512
        last_instance_price:
          type: string
          title: Last Instance Price
          examples:
          - $10.00
        lowest_allocated_price:
          type: string
          examples:
          - $15.00
          nullable: true
        adjustable_memory:
          type: boolean
          title: Adjustable Memory
        default_image_version:
          type: string
          examples:
          - imgver_abc123456
          nullable: true
      type: object
      required:
      - fid
      - instance_type
      - region
      - capacity
      - last_instance_price
      - adjustable_memory
      title: AuctionModel
    LaunchSpecificationModel:
      properties:
        volumes:
          items:
            type: string
            examples:
            - vol_abc123456
          type: array
          title: Volumes
          description: List of volume FIDs
          examples:
          - - vol_1234567890
            - vol_1234567891
        ssh_keys:
          items:
            type: string
            examples:
            - sshkey_abc123456
          type: array
          title: Ssh Keys
          description: List of SSH key FIDs
          examples:
          - - sshkey_1234567890
            - sshkey_1234567891
        startup_script:
          type: string
          nullable: true
        kubernetes_cluster:
          type: string
          examples:
          - clust_abc123456
          nullable: true
        image_version:
          type: string
          examples:
          - imgver_abc123456
          nullable: true
        memory_gb:
          type: integer
          nullable: true
      type: object
      required:
      - volumes
      - ssh_keys
      title: LaunchSpecificationModel
    GetBidsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/BidModel'
          type: array
          title: Data
        next_cursor:
          type: string
          nullable: true
      type: object
      required:
      - data
      title: GetBidsResponse
    CreateBidRequest:
      properties:
        project:
          type: string
          title: Project
          examples:
          - proj_abc123456
        region:
          type: string
          title: Region
          examples:
          - us-central1-a
        instance_type:
          type: string
          title: Instance Type
          examples:
          - it_abc123456
        limit_price:
          type: string
          title: Limit Price
          examples:
          - $25.60
        instance_quantity:
          type: integer
          title: Instance Quantity
          examples:
          - 4
        name:
          type: string
          title: Name
        launch_specification:
          $ref: '#/components/schemas/LaunchSpecificationModel'
        notification_email:
          type: string
          nullable: true
      type: object
      required:
      - project
      - region
      - instance_type
      - limit_price
      - instance_quantity
      - name
      - launch_specification
      title: CreateBidRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SortDirection:
      type: string
      enum:
      - asc
      - desc
    BidModel:
      properties:
        fid:
          type: string
          title: Fid
          examples:
          - bid_abc123456
        name:
          type: string
          title: Name
        project:
          type: string
          title: Project
          examples:
          - proj_abc123456
        created_by:
          type: string
          title: Created By
          examples:
          - user_abc123456
        created_at:
          type: string
          format: datetime
          title: Created At
          examples:
          - '2024-01-01T00:00:00Z'
          - '2024-01-01T00:00:00+00:00'
          - '2024-01-01T00:00:00-00:00'
        deactivated_at:
          type: string
          format: datetime
          examples:
          - '2024-01-01T00:00:00Z'
          - '2024-01-01T00:00:00+00:00'
          - '2024-01-01T00:00:00-00:00'
          nullable: true
        limit_price:
          type: string
          title: Limit Price
          examples:
          - $15.60
        instance_quantity:
          type: integer
          title: Instance Quantity
          examples:
          - 4
        instance_type:
          type: string
          title: Instance Type
          examples:
          - it_abc123456
        region:
          type: string
          examples:
          - us-central1-a
          nullable: true
        instances:
          items:
            type: string
            examples:
            - inst_abc123456
          type: array
          title: Instances
        launch_specification:
          $ref: '#/components/schemas/LaunchSpecificationModel'
        status:
          type: string
          enum:
          - Open
          - Allocated
          - Preempting
          - Terminated
          - Paused
          title: Status
          examples:
          - Open
          - Allocated
          - Preempting
          - Terminated
          - Paused
      type: object
      required:
      - fid
      - name
      - project
      - created_by
      - created_at
      - limit_price
      - instance_quantity
      - instance_type
      - instances
      - launch_specification
      - status
      title: BidModel
    PersistentDiskChange:
      properties:
        attached:
          type: string
          nullable: true
        removed:
          type: string
          nullable: true
      type: object
      title: PersistentDiskChange
    BidStatusResponse:
      properties:
        bid_fid:
          type: string
          title: Bid Fid
          examples:
          - bid_xxxx
        status:
          type: string
          enum:
          - Open
          - Allocated
          - Preempting
          - Terminated
          - Paused
          - Relocating
          title: Status
          examples:
          - Open
          - Allocated
          - Preempting
          - Terminated
          - Paused
          - Relocating
      type: object
      required:
      - bid_fid
      - status
      title: BidStatusResponse
      description: Response model for the detailed bid status endpoint.
    UpdateBidRequest:
      properties:
        limit_price:
          type: string
          nullable: true
        paused:
          type: boolean
          nullable: true
        volumes:
          items:
            type: string
            examples:
            - vol_abc123456
          type: array
          nullable: true
        memory_gb:
          type: integer
          nullable: true
      type: object
      title: UpdateBidRequest
    BidHistoryEventModel:
      properties:
        timestamp:
          type: string
          format: datetime
          title: Timestamp
          description: When the event occurred
          examples:
          - '2024-01-01T00:00:00Z'
          - '2024-01-01T00:00:00+00:00'
          - '2024-01-01T00:00:00-00:00'
        event_type:
          type: string
          enum:
          - Placed
          - Paused
          - Resumed
          - Terminated
          - Allocated
          - Preempted
          - Limit Price Changed
          - Memory Adjusted
          - Volumes Attached
          - Volumes Removed
          title: Event Type
          examples:
          - Placed
          - Paused
          - Resumed
          - Terminated
          - Allocated
          - Preempted
          - Limit Price Changed
          - Memory Adjusted
          - Volumes Attached
          - Volumes Removed
        limit_price:
          type: string
          examples:
          - $15.60
          nullable: true
        user_id:
          type: string
          nullable: true
        memory_gb:
          type: integer
          nullable: true
        persistent_disk_change:
          $ref: '#/components/schemas/PersistentDiskChange'
          nullable: true
      type: object
      required:
      - timestamp
      - event_type
      title: BidHistoryEventModel
      description: A single event in the history of a spot bid.
    BidHistoryResponse:
      properties:
        bid_fid:
          type: string
          title: Bid Fid
          examples:
          - bid_abc123456
        events:
          items:
            $ref: '#/components/schemas/BidHistoryEventModel'
          type: array
          title: Events
          description: List of historical events for this bid, ordered by timestamp
      type: object
      required:
      - bid_fid
      - events
      title: BidHistoryResponse
      description: Response model for bid history.
    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
  securitySchemes:
    MithrilAPIKey:
      type: http
      scheme: bearer
      bearerFormat: fkey_<key>
x-provenance:
  method: harvested
  publisher: Mithril
  source: https://api.mithril.ai/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)