Integrate hyper-local Bristol knowledge into your applications. Simple REST API with real-time data on community services, events, and support resources.
curl -X POST \
https://ai.mottatracking.com/external_api.php \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-d '{
"model": "ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP",
"messages": [{
"role": "user",
"content": "Where can I get a free meal today?"
}]
}'
Start free by becoming a subscriber and scale as you grow. No hidden fees.
24-hour free trial access
For individual developers
For growing businesses
For large-scale deployments
Built specifically for Bristol, designed for developers.
99.9% uptime guarantee with response times under 500ms. Built to handle your production workloads.
Real-time Bristol data including food banks, support services, events, and community resources.
ICO registered (ZC042900) with enterprise-grade security. Your data is protected by UK law.
RESTful API with comprehensive documentation. Get started in minutes with any programming language.
Choose from different AI personalities including Bristolian dialect for authentic local interactions.
Track your API usage with detailed analytics dashboard. Monitor requests, costs, and performance.
Everything you need to integrate Nyata AI into your application.
Copy this into a file, drop in your API key, and run it. Needs only curl and python3 — both preinstalled on macOS/Linux, and available via Git Bash or WSL on Windows.
#!/usr/bin/env bash
# nyata-quickstart.sh — ask Nyata AI anything, from any terminal
# Usage:
# export NYATA_API_KEY="your_api_key"
# ./nyata-quickstart.sh "Where can I get a free meal today?"
set -euo pipefail
API_KEY="${NYATA_API_KEY:?Set NYATA_API_KEY first, e.g. export NYATA_API_KEY=your_api_key}"
QUESTION="${1:-Where can I get a free meal today?}"
curl -s -X POST https://ai.mottatracking.com/external_api.php \
-H "Content-Type: application/json" \
-H "X-API-Key: $API_KEY" \
-d "$(python3 -c 'import json,sys; print(json.dumps({"model":"ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP","messages":[{"role":"user","content":sys.argv[1]}]}))' "$QUESTION")" \
| python3 -c "import sys, json; print(json.load(sys.stdin)['choices'][0]['message']['content'])"
Run it:
chmod +x nyata-quickstart.sh
export NYATA_API_KEY="your_api_key"
./nyata-quickstart.sh "Where can I find a food bank?"
ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP — this is what the API actually matches against. Don't shorten it in real requests.
All API requests require authentication using an API key. Include your key in the X-API-Key header with every request.
Get your API key from the Purchase Page (login required).
All API requests should be made to:
Send a JSON body with the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Model to use. Use "ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP" for Bristol-specific responses. |
| messages | array | Required | Array of message objects with "role" and "content" properties. |
| max_tokens | integer | Optional | Maximum tokens in response. Default: 1000 |
| temperature | float | Optional | Creativity level (0-1). Default: 0.7 |
Successful responses return an OpenAI-compatible JSON object:
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1733500000,
"model": "ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! There are several places..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 150,
"total_tokens": 175
}
}
Accessing the response:
// JavaScript
const reply = data.choices[0].message.content;
pip install nyata) and JavaScript (npm install nyata) packages are on the Month-1 roadmap to remove the need to hand-write requests below.
curl -X POST https://ai.mottatracking.com/external_api.php \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key" \
-d '{"model": "ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP", "messages": [{"role": "user", "content": "Where can I find a food bank?"}]}'
const response = await fetch(
'https://ai.mottatracking.com/external_api.php',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key'
},
body: JSON.stringify({
model: 'ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP',
messages: [{ role: 'user', content: 'Where can I find a food bank?' }],
max_tokens: 300
})
}
);
const data = await response.json();
// Access the AI response
if (data.choices && data.choices.length > 0) {
const reply = data.choices[0].message.content;
console.log(reply);
}
import requests
response = requests.post(
'https://ai.mottatracking.com/external_api.php',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'your_api_key'
},
json={
'model': 'ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP',
'messages': [{'role': 'user', 'content': 'Where can I find a food bank?'}],
'max_tokens': 300
}
)
data = response.json()
# Access the AI response
if data.get('choices'):
reply = data['choices'][0]['message']['content']
print(reply)
pip install nyata interface. Auth, retries, and JSON parsing are handled for you.
# pip install nyata
from nyata import Nyata
client = Nyata(api_key="your_api_key")
response = client.chat.create(
model="ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP",
messages=[{"role": "user", "content": "Where can I find a food bank?"}]
)
# SDK returns the reply directly, no manual JSON parsing
print(response.reply)
# Built-in retry/backoff on 429s, clear exceptions on 403 quota_exceeded
try:
response = client.chat.create(model="ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP", messages=[...])
except nyata.QuotaExceededError:
print("Plan quota used up, check the dashboard")
npm install nyata interface. Auth, retries, and JSON parsing are handled for you.
// npm install nyata
import Nyata from 'nyata';
const client = new Nyata({ apiKey: 'your_api_key' });
const response = await client.chat.create({
model: 'ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP',
messages: [{ role: 'user', content: 'Where can I find a food bank?' }]
});
// SDK returns the reply directly, no manual JSON parsing
console.log(response.reply);
// Built-in retry/backoff on 429s, typed errors on 403 quota_exceeded
try {
await client.chat.create({ model: 'ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP', messages: [...] });
} catch (err) {
if (err instanceof Nyata.QuotaExceededError) {
console.log('Plan quota used up, check the dashboard');
}
}
The API uses standard HTTP status codes:
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request – Invalid parameters |
| 401 | Unauthorized – Invalid or missing API key |
| 403 | Forbidden – API key doesn't have access, or your plan's monthly quota has been used up (quota_exceeded). Check your dashboard or upgrade your plan. |
| 429 | Too Many Requests – You're sending requests faster than your plan allows. Read the Retry-After header (seconds) and back off before retrying. |
| 500 | Server Error – Something went wrong |
quota_exceeded means you've used your plan's full monthly allowance — upgrading or waiting for your billing cycle to reset fixes it. A 429 means you're within quota but sending requests too fast — slow down and retry.
Every plan has a monthly request allowance shown on the pricing table, plus a short-term rate limit to keep the API responsive for everyone.
Retry-After header before retrying.quota_exceeded, don't retry — check your dashboard for remaining quota and reset date, or upgrade your plan.The current API version is v1.0. The model string you send (e.g. ...nyata:bristol:ChciyaQP) is versioned independently of the API itself — if that changes, you'll be notified in advance.
Documentation roadmap above is based on Week-2 API benchmarking and developer-experience research by Kush Sharma (DevRel & API Partnerships), comparing Nyata against OpenAI, Stripe, and Twilio.