apicheats.dev github/llms.txt Raw .md
GET

GET /user/codespaces/{codespace_name}/machines — GitHub API

GitHub token (required); https://api.github.com

GitHub API

List machine types for a codespace

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 160 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X GET 'https://api.github.com/user/codespaces/example-codespace-name/machines' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10'

Parameters

Name In Type Required Description
codespace_name path string Yes The name of the codespace.

Response 200 OK

{
  "total_count": 0,
  "machines": [
    {
      "name": "standardLinux",
      "display_name": "4 cores, 16 GB RAM, 64 GB storage",
      "operating_system": "linux",
      "storage_in_bytes": 68719476736,
      "memory_in_bytes": 17179869184,
      "cpus": 4,
      "prebuild_availability": "ready"
    }
  ]
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.