Get virtual key
import requests
url = "https://app.langwatch.ai/api/gateway/v1/virtual-keys/{id}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/gateway/v1/virtual-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/gateway/v1/virtual-keys/{id} \
--header 'X-Auth-Token: <api-key>'{
"virtual_key": {
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"purpose": "user",
"display_prefix": "<string>",
"principal_user_id": "<string>",
"trace_project_id": "<string>",
"trace_project_archived": true,
"external_id": "<string>",
"metadata": {},
"scopes": [
{
"scope_type": "organization",
"scope_id": "<string>"
}
],
"routing_policy_id": "<string>",
"routing_mode": "none",
"revision": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"config": "<unknown>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Gateway: Virtual Keys
Get virtual key
GET
/
api
/
gateway
/
v1
/
virtual-keys
/
{id}
Get virtual key
import requests
url = "https://app.langwatch.ai/api/gateway/v1/virtual-keys/{id}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/gateway/v1/virtual-keys/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/gateway/v1/virtual-keys/{id} \
--header 'X-Auth-Token: <api-key>'{
"virtual_key": {
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"status": "active",
"purpose": "user",
"display_prefix": "<string>",
"principal_user_id": "<string>",
"trace_project_id": "<string>",
"trace_project_archived": true,
"external_id": "<string>",
"metadata": {},
"scopes": [
{
"scope_type": "organization",
"scope_id": "<string>"
}
],
"routing_policy_id": "<string>",
"routing_mode": "none",
"revision": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"config": "<unknown>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"meta": {},
"trace_id": "<string>",
"span_id": "<string>"
}
}Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Path Parameters
Response
Virtual key detail
Show child attributes
Show child attributes
Last modified on May 19, 2026
Was this page helpful?
⌘I