/ai/token/get
GET https://api.sitehost.nz/1.5/ai/token/get.json
Returns the details and configuration of an AI token. The token value itself is not returned. Limits of 0 mean no limit, and cost limits are in NZD (excl. GST).
Query Parameters
| Parameter | Type | Required | Description |
| client_id | integer | Yes | The ID for the client.Example: 1 |
| key_id | string | Yes | The ID of the token.Example: 3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.5/ai/token/get.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.5/ai/token/get.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'
uri = URI.parse("https://api.sitehost.nz/1.5/ai/token/get.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
import requests
uri = 'https://api.sitehost.nz/1.5/ai/token/get.json?apikey=your_key_here&client_id=1&key_id=3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f'
response = requests.get(uri)
Response
200:application/json
{
"return": {
"key_id": "3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f",
"label": "Production app",
"date_added": "2026-09-01 10:15:42",
"date_updated": "2026-09-14 16:03:08",
"config": {
"allowed_ips": [
"203.0.113.0/24",
"2001:db8::1"
],
"capabilities": [
"inference",
"embedding"
],
"requests_per_minute": 60,
"cost_limit_hourly": 5,
"cost_limit_daily": 50,
"cost_limit_monthly": 0
}
},
"msg": "Successful",
"status": true
}
"return": {
"key_id": "3f6c2a9e-8b14-4d7a-9c5e-1a2b3c4d5e6f",
"label": "Production app",
"date_added": "2026-09-01 10:15:42",
"date_updated": "2026-09-14 16:03:08",
"config": {
"allowed_ips": [
"203.0.113.0/24",
"2001:db8::1"
],
"capabilities": [
"inference",
"embedding"
],
"requests_per_minute": 60,
"cost_limit_hourly": 5,
"cost_limit_daily": 50,
"cost_limit_monthly": 0
}
},
"msg": "Successful",
"status": true
}