LogoLogo
Foundry Documentation
Foundry Documentation
  • Welcome to Foundry
  • Quickstart guide
  • Compute & Storage
    • Compute overview
    • Instance types & specifications
    • Reserving compute
    • Spot bids
      • Spot auction mechanics
    • Startup scripts
    • Access & manage instances
      • Statuses
    • Compute quotas
    • Managing open ports
    • Persistent storage
      • File shares
      • Block storage
    • Ephemeral storage
  • Foundry API
    • API overview and quickstart
    • API reference
      • Projects
      • Instance types
      • SSH Keys
      • Volumes
      • Instances
      • Spot
        • Bids
        • Availability
      • API Keys
      • Profile
    • Specification
  • Access Management
    • Access Management Overview
    • SSH keys
  • Account and Billing
    • Billing overview
    • Foundry Referral Program
  • Security & trust
    • Foundry's approach to security
    • Reporting security concerns
Powered by GitBook
LogoLogo

© 2025 Foundry Technologies, Inc.

On this page
  1. Foundry API
  2. API reference
  3. Spot

Bids

PreviousSpotNextAvailability

Last updated 13 days ago

Cancel Bid

delete

Cancel a Spot bid

Authorizations
Path parameters
bid_fidstringRequired
Responses
204
Successful Response
422
Validation Error
application/json
delete
DELETE /v2/spot/bids/{bid_fid} HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Accept: */*

No content

  • GETGet Bids
  • POSTCreate Bid
  • DELETECancel Bid
  • PATCHUpdate Bid

Get Bids

get

Get all Spot bids for a project

Authorizations
Query parameters
next_cursorany ofOptional
anyOptional
or
nullOptional
sort_bystring · enum | nullableOptionalPossible values:
sort_dirstring · enum | nullableOptionalPossible values:
projectstringRequired
instance_typestring | nullableOptionalExample: it_abc123456
regionstring | nullableOptionalExample: us-central1-a
statusstring · enum | nullableOptionalPossible values:
limitinteger | nullableOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v2/spot/bids HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Accept: */*
{
  "data": [
    {
      "fid": "bid_abc123456",
      "name": "text",
      "project": "proj_abc123456",
      "created_by": "user_abc123456",
      "created_at": "2024-01-01T00:00:00Z",
      "deactivated_at": "2024-01-01T00:00:00Z",
      "limit_price": "$15.60",
      "instance_quantity": 4,
      "instance_type": "it_abc123456",
      "region": "us-central1-a",
      "instances": [
        "inst_abc123456"
      ],
      "launch_specification": {
        "volumes": [
          "vol_abc123456"
        ],
        "ssh_keys": [
          "sshkey_abc123456"
        ],
        "startup_script": "text",
        "kubernetes_cluster": "clust_abc123456"
      },
      "status": "Open"
    }
  ],
  "next_cursor": "text"
}

Create Bid

post

Place a new Spot bid

Authorizations
Body
projectstringRequiredExample: proj_abc123456
regionstringRequiredExample: us-central1-a
instance_typestringRequiredExample: it_abc123456
limit_pricestringRequiredExample: $25.60
instance_quantityintegerRequiredExample: 4
namestringRequired
Responses
201
Successful Response
application/json
422
Validation Error
application/json
post
POST /v2/spot/bids HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Content-Type: application/json
Accept: */*
Content-Length: 291

{
  "project": "proj_abc123456",
  "region": "us-central1-a",
  "instance_type": "it_abc123456",
  "limit_price": "$25.60",
  "instance_quantity": 4,
  "name": "text",
  "launch_specification": {
    "volumes": [
      "vol_abc123456"
    ],
    "ssh_keys": [
      "sshkey_abc123456"
    ],
    "startup_script": "text",
    "kubernetes_cluster": "clust_abc123456"
  }
}
{
  "fid": "bid_abc123456",
  "name": "text",
  "project": "proj_abc123456",
  "created_by": "user_abc123456",
  "created_at": "2024-01-01T00:00:00Z",
  "deactivated_at": "2024-01-01T00:00:00Z",
  "limit_price": "$15.60",
  "instance_quantity": 4,
  "instance_type": "it_abc123456",
  "region": "us-central1-a",
  "instances": [
    "inst_abc123456"
  ],
  "launch_specification": {
    "volumes": [
      "vol_abc123456"
    ],
    "ssh_keys": [
      "sshkey_abc123456"
    ],
    "startup_script": "text",
    "kubernetes_cluster": "clust_abc123456"
  },
  "status": "Open"
}

Update Bid

patch

Update the limit price of a Spot bid

Authorizations
Path parameters
bid_fidstringRequired
Body
limit_pricestring | nullableOptional
pausedboolean | nullableOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
patch
PATCH /v2/spot/bids/{bid_fid} HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "limit_price": "text",
  "paused": true
}
{
  "fid": "bid_abc123456",
  "name": "text",
  "project": "proj_abc123456",
  "created_by": "user_abc123456",
  "created_at": "2024-01-01T00:00:00Z",
  "deactivated_at": "2024-01-01T00:00:00Z",
  "limit_price": "$15.60",
  "instance_quantity": 4,
  "instance_type": "it_abc123456",
  "region": "us-central1-a",
  "instances": [
    "inst_abc123456"
  ],
  "launch_specification": {
    "volumes": [
      "vol_abc123456"
    ],
    "ssh_keys": [
      "sshkey_abc123456"
    ],
    "startup_script": "text",
    "kubernetes_cluster": "clust_abc123456"
  },
  "status": "Open"
}