---
title: "Get key context"
description: "The workspace, mode and cell this key works on.\n\nUseful to check a key and to see which cell answers.\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.qomni.ai/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Qomni Agents API › Account

`GET /ping`

The workspace, mode and cell this key works on.

Useful to check a key and to see which cell answers.

## Authentication

- `apiKey`, http, header `Authorization`, format `sk_agents_{live|test}_{cell}_{body}{checksum}`

## Code samples

### TypeScript

```typescript
import { Qomni } from "@qomni/sdk";

const qomni = new Qomni({ apiKey: process.env.QOMNI_KEY! });

const context = await qomni.agents.getContext();
console.log(context);

```

### cURL

```bash
curl --request GET \
  --url https://api.qomni.ai/agents/v1/ping \
  --header 'Authorization: Bearer <token>'
```

### Python

```python
import requests

url = "https://api.qomni.ai/agents/v1/ping"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

The key's context.

#### Example

```json
{
  "product": "agents",
  "tenant": "string",
  "cell": "string",
  "region": "string",
  "livemode": true
}
```

- `product` (`getContext.response.200.product`; string, required)
- `tenant` (`getContext.response.200.tenant`; string, required)
- `cell` (`getContext.response.200.cell`; string, required)
- `region` (`getContext.response.200.region`; string, required)
- `livemode` (`getContext.response.200.livemode`; boolean, required)

### 401

Missing or invalid credentials (`unauthenticated`).

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`getContext.response.401.error`; object, required)
  - `code` (`getContext.response.401.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`getContext.response.401.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`getContext.response.401.error.request_id`; string, optional)
  - `fields` (`getContext.response.401.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.

### 403

Valid credentials that may not do this (`insufficient_scope`, `api_key_wrong_product`…).

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`getContext.response.403.error`; object, required)
  - `code` (`getContext.response.403.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`getContext.response.403.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`getContext.response.403.error.request_id`; string, optional)
  - `fields` (`getContext.response.403.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.

### 429

Too many requests for this key (`rate_limited`); retry after `Retry-After` seconds.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "fields": {
      "property1": [
        "string"
      ],
      "property2": [
        "string"
      ]
    }
  }
}
```

- `error` (`getContext.response.429.error`; object, required)
  - `code` (`getContext.response.429.error.code`; string, required) — Stable, machine-readable; each operation lists the codes it can return.
    - pattern `^[a-z][a-z0-9_]*$`
  - `message` (`getContext.response.429.error.message`; string, required) — For people; may change at any time.
  - `request_id` (`getContext.response.429.error.request_id`; string, optional)
  - `fields` (`getContext.response.429.error.fields`; map<array<string>>, optional) — Only for validation_failed, the messages per field.


Source: https://docs.qomni.ai/agents-api/ping/list/index.md
