Skip to main content
Vertex
Docs/POST /v2/sessions — Create Inference Session
v2.4
POST/v2/sessions

Initialize a stateful or streaming inference session with automatic edge consensus and latency optimization.

Quota: 5,000 req/minAuth: Bearer Token

Request Example

curl -X POST https://api.example.com/v2/sessions \
  -H "Authorization: Bearer vtx_live_79f82d1c" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "vertex-core-v2",
    "temperature": 0.2,
    "stream": false
  }'

Parameters

ParameterTypeRequiredDescription
modelstringrequiredThe targeted model identifier (e.g. 'vertex-core-v2' or 'vertex-fast-embed').
maxTokensintegeroptionalMaximum output tokens to generate. Defaults to 2048 (max: 8192).
temperaturenumberoptionalSampling temperature between 0.0 and 1.0. Lower values are more deterministic.
streambooleanoptionalWhether to return chunks via Server-Sent Events (SSE). Default: false.
Response Example (200 OK)application/json
{
  "id": "sess_01HXYZ883749",
  "object": "session",
  "created": 1792440100,
  "model": "vertex-core-v2",
  "status": "active",
  "region": "us-east-1",
  "tokensRemaining": 2048
}

Create Inference Session

Establishes an active inference runtime session pinned to the lowest-latency regional edge cluster. Sessions maintain ephemeral KV caches for multi-turn conversations and agentic reasoning workflows.

HTTP Request

POST https://api.example.com/v2/sessions

Headers

Header Value Description
Authorization Bearer <token> Required valid API credential
Content-Type application/json Required request MIME type
X-Vertex-Region us-east-1 Optional region pin override
Was this documentation page helpful?

Help us improve the Vertex developer experience.