Create Session
Launch a new isolated browser session with stealth configuration, proxy, and fingerprint.
Request
curl --request POST \
--url https://api.sessionkit.dev/v1/sessions \
--header 'Authorization: Bearer sk_live_...' \
--header 'Content-Type: application/json' \
--data '{
"proxy": { "type": "residential", "country": "US", "sticky": true },
"stealth": "max",
"fingerprint": "auto",
"timeout": 300
}'
from sessionkit import SessionKit
sk = SessionKit(api_key="sk_live_...")
session = sk.sessions.create(
proxy={"type": "residential", "country": "US", "sticky": True},
stealth="max",
fingerprint="auto",
timeout=300,
)
import { SessionKit } from '@sessionkit/sdk'
const sk = new SessionKit({ apiKey: 'sk_live_...' })
const session = await sk.sessions.create({
proxy: { type: 'residential', country: 'US', sticky: true },
stealth: 'max',
fingerprint: 'auto',
timeout: 300,
})
$sk = new \SessionKit\Client('sk_live_...');
$session = $sk->sessions->create([
'proxy' => ['type' => 'residential', 'country' => 'US', 'sticky' => true],
'stealth' => 'max',
'fingerprint' => 'auto',
'timeout' => 300,
]);
sk := sessionkit.New("sk_live_...")
session, err := sk.Sessions.Create(context.Background(), &sessionkit.CreateSessionParams{
Proxy: &sessionkit.Proxy{Type: "residential", Country: "US", Sticky: true},
Stealth: "max",
Fingerprint: "auto",
Timeout: 300,
})
SessionKit sk = new SessionKit("sk_live_...");
Session session = sk.sessions().create(CreateSessionRequest.builder()
.proxy(Proxy.builder().type("residential").country("US").sticky(true).build())
.stealth("max")
.fingerprint("auto")
.timeout(300)
.build());
sk = SessionKit::Client.new(api_key: "sk_live_...")
session = sk.sessions.create(
proxy: { type: "residential", country: "US", sticky: true },
stealth: "max",
fingerprint: "auto",
timeout: 300
)
Response
{
"id": "ses_k8m2n4p6",
"status": "active",
"cdpUrl": "wss://api.sessionkit.dev/cdp/ses_k8m2n4p6?token=ct_abc123",
"proxy": {
"type": "residential",
"country": "US",
"ip": "184.xxx.xxx.xxx"
},
"fingerprint": {
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)..."
},
"expiresAt": "2026-06-23T15:30:00Z"
}
{
"error": {
"code": "INVALID_PARAMS",
"message": "proxy.type must be one of: residential, datacenter, isp, mobile",
"details": { "field": "proxy.type", "value": "invalid" }
}
}
{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "Monthly session quota exceeded. Upgrade plan at https://sessionkit.dev/billing"
}
}
{
"error": {
"code": "FORBIDDEN",
"message": "API key does not have permission to create sessions"
}
}
{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after 2 seconds",
"details": { "retryAfter": 2 }
}
}