---
title: "Create an Xcode instance"
method: POST
path: "/v1/xcode_instances"
---

# Create an Xcode instance

`POST /v1/xcode_instances`

## Query parameters

- `wait` boolean
- `reuseIfExists` boolean

## Request body

- XcodeInstanceCreate
  - `metadata` object
    - `displayName` string
    - `labels` object
  - `spec` object
    - `clues` object[]
      - `kind` 'ClientIP', required
      - `clientIp` string
    - `region` string — Where the instance will be created. If not given, the region is decided based on scheduling clues (client IP) and availability. A region is a preference, not a hard pin: the request always overflows to every other available region, ordered by proximity, when the preferred ones are full. Accepted values: * A specific region name (e.g. "us-west1"). It is tried first, then the remaining regions in order of proximity to it. Scheduling clues (client IP) are ignored when a region is given. * A region group name (e.g. "us", "eu"). Its member regions are tried first in their listed order, then the remaining regions by proximity to the first member. * A pipe-separated, ordered list of regions (e.g. "us-east1|us-west1"). Those are tried first in the given order, then the remaining regions by proximity to the first.
    - `inactivityTimeout` string, duration — After how many minutes of inactivity should the instance be terminated. Example values 1m, 10m, 3h. Default is 3m. Providing "0" uses the organization's default inactivity timeout.
    - `hardTimeout` string, duration — After how many minutes should the instance be terminated. Example values 1m, 10m, 3h. Default is "0" which means no hard timeout.

## Response `200`

OK

- XcodeInstance
  - `metadata` object, required
    - `id` string, required
    - `displayName` string
    - `organizationId` string, required
    - `createdAt` string, date-time, required
    - `terminatedAt` string, date-time
    - `labels` object
  - `spec` object, required
    - `region` string, required
    - `inactivityTimeout` string, duration, required
    - `hardTimeout` string, duration
  - `status` object, required
    - `state` 'unknown' | 'creating' | 'assigned' | 'ready' | 'terminated', required
    - `apiUrl` string
    - `token` string, required
    - `errorMessage` string

## Other responses

- `default` — Error

## Changes

- **2026-04-09** `bf3778fef35f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/limrun-inc/apis/limrun-api/changes/v1/xcode_instances/post.md)

---

[API](https://skmtc.dev/limrun-inc/apis/limrun-api.md) · [All operations](https://skmtc.dev/limrun-inc/apis/limrun-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/limrun-inc/limrun-api/revisions/22b815649ef7/schema)
