Skip to main content
POST
/
computers
curl -X POST https://api.tzafon.ai/computers \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "browser",
    "timeout_seconds": 3600,
    "inactivity_timeout_seconds": 120,
    "display": {
      "width": 1920,
      "height": 1080
    }
  }'
{
  "id": "comp_a1b2c3d4e5f6",
  "kind": "browser",
  "status": "ready",
  "created_at": "2025-01-16T12:00:00Z",
  "expires_at": "2025-01-16T13:00:00Z",
  "idle_expires_at": "2025-01-16T12:02:00Z",
  "max_lifetime_seconds": 3600,
  "inactivity_timeout_seconds": 120,
  "auto_kill": true
}

Request

kind
string
default:"browser"
Session type: browser or desktop
timeout_seconds
integer
Maximum session lifetime in seconds. Defaults to plan maximum.
inactivity_timeout_seconds
integer
default:"120"
Seconds of inactivity before auto-termination (if auto_kill is true)
auto_kill
boolean
default:"true"
Automatically terminate session after inactivity timeout
display
object
Display configuration
context_id
string
Custom identifier for request correlation and logging

Response

id
string
required
Session ID (format: comp_<hex>)
kind
string
required
Session type: browser or desktop
status
string
required
Session status: ready
created_at
string
required
ISO 8601 timestamp
expires_at
string
When max lifetime expires
idle_expires_at
string
When inactivity timeout expires
max_lifetime_seconds
integer
Configured max lifetime
inactivity_timeout_seconds
integer
Configured inactivity timeout
auto_kill
boolean
Whether auto-termination is enabled
curl -X POST https://api.tzafon.ai/computers \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "browser",
    "timeout_seconds": 3600,
    "inactivity_timeout_seconds": 120,
    "display": {
      "width": 1920,
      "height": 1080
    }
  }'
{
  "id": "comp_a1b2c3d4e5f6",
  "kind": "browser",
  "status": "ready",
  "created_at": "2025-01-16T12:00:00Z",
  "expires_at": "2025-01-16T13:00:00Z",
  "idle_expires_at": "2025-01-16T12:02:00Z",
  "max_lifetime_seconds": 3600,
  "inactivity_timeout_seconds": 120,
  "auto_kill": true
}