cURL
#!/bin/sh
# getKey: Get the calling key. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/key" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""getKey: Get the calling key. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.get(f"{BASE}/public/v1/key", params={},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
r.raise_for_status()
print(r.json())
// getKey: Get the calling key. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/key`, { headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"created_at": "2026-10-01T09:00:00+00:00",
"expires_at": "2027-10-01T09:00:00+00:00",
"key_id": "6720f0c1a2b3c4d5e6f70812",
"last4": "Qx7k",
"last_used_at": "2026-10-06T05:59:58+00:00",
"limit": 100,
"name": "research-bot",
"prefix": "tl_live_",
"scopes": [
"market:read"
],
"tier": "FREE",
"window_s": 60
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Your key
Get the calling key
The calling key: id, name, scopes, tier, limit and expiry — never the secret. Needs a valid key and no scope.
GET
/
public
/
v1
/
key
cURL
#!/bin/sh
# getKey: Get the calling key. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/key" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""getKey: Get the calling key. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.get(f"{BASE}/public/v1/key", params={},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
r.raise_for_status()
print(r.json())
// getKey: Get the calling key. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/key`, { headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"created_at": "2026-10-01T09:00:00+00:00",
"expires_at": "2027-10-01T09:00:00+00:00",
"key_id": "6720f0c1a2b3c4d5e6f70812",
"last4": "Qx7k",
"last_used_at": "2026-10-06T05:59:58+00:00",
"limit": 100,
"name": "research-bot",
"prefix": "tl_live_",
"scopes": [
"market:read"
],
"tier": "FREE",
"window_s": 60
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Authorization: Bearer tl_live_…
Response
Successful Response
when the key was created, ISO 8601
when the key stops working, ISO 8601
the key's id
the secret's last four characters
requests allowed per window
the name given at creation
the secret's fixed prefix, tl_live_
what the key may read: market:read, account:read
the owner's plan tier, which sets the limit
the rate-limit window in seconds
when the key last authenticated a request, ISO 8601; null if never