Skip to main content

Regions

PolarGrid runs GPU infrastructure at edge locations to minimize latency.

Available Regions

IDNameLocation
yvr-01VancouverCanada West
ymq-01MontrealCanada East
was-01WashingtonUS East

Endpoint URLs

https://api.{region-id}.edge.polargrid.ai:55111
Examples:
  • https://api.yvr-01.edge.polargrid.ai:55111
  • https://api.ymq-01.edge.polargrid.ai:55111
  • https://api.was-01.edge.polargrid.ai:55111

Auto-Routing

The SDKs can automatically select the fastest region:
// Async factory tests all regions and picks fastest
const client = await PolarGrid.create({
  apiKey: "pg_your_api_key",
  debug: true, // See latency results
});

// [PolarGrid] Auto-routing: latency results: yvr-01=45ms, ymq-01=82ms, was-01=67ms
// [PolarGrid] Auto-routing: selected Vancouver (yvr-01) with 45ms latency

console.log(client.getRegionId()); // 'yvr-01'
console.log(client.getRegionName()); // 'Vancouver'

Explicit Region Selection

You can specify a region by ID or alias:
// By alias (case-insensitive)
const client = new PolarGrid({
  apiKey: "pg_...",
  region: "vancouver", // or 'montreal', 'washington'
});

// By ID
const client = new PolarGrid({
  apiKey: "pg_...",
  region: "yvr-01", // or 'ymq-01', 'was-01'
});

Region Aliases

For convenience, these aliases are supported:
AliasRegion ID
vancouver, yvryvr-01
montreal, ymqymq-01
washington, waswas-01

Checking Latency

CLI

# List regions with current latency
polargrid regions list

# Detailed ping test
polargrid regions ping --count 5

SDK

Auto-routing logs latency when debug is enabled:
const client = await PolarGrid.create({
  apiKey: "pg_...",
  debug: true,
});
// [PolarGrid] Auto-routing: latency results: yvr-01=45ms, ymq-01=82ms, was-01=67ms

Default Region

If you don’t specify a region and don’t use auto-routing, the SDKs default to Montreal (ymq-01). For CLI, you can set a default:
polargrid config set default_region yvr-01

Direct API Access

For raw HTTP requests, use the full endpoint:
curl https://api.yvr-01.edge.polargrid.ai:55111/v1/chat/completions \
  -H "Authorization: Bearer pg_..." \
  -H "Content-Type: application/json" \
  -d '{"model": "llama-3.1-8b", "messages": [...]}'