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

SSH Keys

PreviousInstance typesNextVolumes

Last updated 1 month ago

Delete Ssh Key

delete

Delete an SSH key. Note that SSH keys used in active bids/reservations cannot be deleted.

Authorizations
Path parameters
ssh_key_fidstringRequiredExample: sshkey_abc123456
Responses
204
Successful Response
422
Validation Error
application/json
delete
DELETE /v2/ssh-keys/{ssh_key_fid} HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Accept: */*

No content

  • GETGet Ssh Keys
  • POSTCreate Ssh Key
  • DELETEDelete Ssh Key

Get Ssh Keys

get

Get all SSH keys for a project

Authorizations
Query parameters
projectstringRequiredExample: proj_abc123456
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v2/ssh-keys HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Accept: */*
[
  {
    "fid": "sshkey_abc123456",
    "name": "text",
    "project": "proj_abc123456",
    "public_key": "text",
    "created_at": "2024-01-01T00:00:00Z"
  }
]

Create Ssh Key

post

Create a new SSH key. If public_key is not provided, this endpoint will generate a new RSA key pair and return both the private and public keys.

Authorizations
Body
projectstringRequiredExample: proj_abc123456
namestringRequired
public_keyany ofOptional
stringOptional
or
nullOptional
Responses
201
Successful Response
application/json
422
Validation Error
application/json
post
POST /v2/ssh-keys HTTP/1.1
Host: api.mlfoundry.com
Authorization: Bearer fkey_<key>
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "project": "proj_abc123456",
  "name": "text",
  "public_key": "text"
}
{
  "fid": "sshkey_abc123456",
  "name": "text",
  "project": "proj_abc123456",
  "public_key": "text",
  "created_at": "2024-01-01T00:00:00Z",
  "private_key": "-----BEGIN RSA PRIVATE KEY-----..."
}