API v1.0

Build with Bristol's Community AI

Integrate hyper-local Bristol knowledge into your applications. Simple REST API with real-time data on community services, events, and support resources.

cURL
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?"
    }]
  }'

Simple, Transparent Pricing

Start free by becoming a subscriber and scale as you grow. No hidden fees.

Starter
£0

24-hour free trial access

  • 100 API requests
  • Basic support
  • 1-day access only
  • Full documentation
  • Requires redeem code
Get Started Free
Basic
£10/mo

For individual developers

  • 1,000 requests/month
  • Email support
  • 30-day access
  • Full documentation
  • Usage analytics
Purchase Basic
Enterprise
Custom

For large-scale deployments

  • Unlimited requests
  • 24/7 dedicated support
  • SLA guarantee
  • Custom development
  • White-label options
Contact Sales

Why Choose Nyata API?

Built specifically for Bristol, designed for developers.

Fast & Reliable

99.9% uptime guarantee with response times under 500ms. Built to handle your production workloads.

Hyper-Local Knowledge

Real-time Bristol data including food banks, support services, events, and community resources.

Secure & Compliant

ICO registered (ZC042900) with enterprise-grade security. Your data is protected by UK law.

Simple Integration

RESTful API with comprehensive documentation. Get started in minutes with any programming language.

Multiple Personalities

Choose from different AI personalities including Bristolian dialect for authentic local interactions.

Usage Analytics

Track your API usage with detailed analytics dashboard. Monitor requests, costs, and performance.

API Documentation

Everything you need to integrate Nyata AI into your application.

Quickstart Script

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?"
The model string must be sent exactly as 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.

Authentication

All API requests require authentication using an API key. Include your key in the X-API-Key header with every request.

X-API-Key: your_api_key_here

Get your API key from the Purchase Page (login required).

Base URL

All API requests should be made to:

POST https://ai.mottatracking.com/external_api.php

Request Format

Send a JSON body with the following parameters:

ParameterTypeRequiredDescription
modelstringRequiredModel to use. Use "ft:gpt-4.1-mini-2025-04-14:nyata:bristol:ChciyaQP" for Bristol-specific responses.
messagesarrayRequiredArray of message objects with "role" and "content" properties.
max_tokensintegerOptionalMaximum tokens in response. Default: 1000
temperaturefloatOptionalCreativity level (0-1). Default: 0.7

Response Format

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;

Code Examples

Official SDKs coming soon. Python (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)
Preview – not released yet. This is the planned 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")
Preview – not released yet. This is the planned 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');
  }
}

Error Handling

The API uses standard HTTP status codes:

CodeDescription
200Success
400Bad Request – Invalid parameters
401Unauthorized – Invalid or missing API key
403Forbidden – 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.
429Too Many Requests – You're sending requests faster than your plan allows. Read the Retry-After header (seconds) and back off before retrying.
500Server Error – Something went wrong
403 vs 429: a 403 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.

Rate Limits & Retries

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.

Recommended retry strategy

  • On 429, wait for the duration in the Retry-After header before retrying.
  • Use exponential backoff for repeated 429 or 500 responses (e.g. 1s, 2s, 4s, 8s).
  • On 403 quota_exceeded, don't retry — check your dashboard for remaining quota and reset date, or upgrade your plan.
Coming in Month-1: a public Request Logs & Debug Dashboard so you can see live status codes, latency, and failed calls per API key.

Versioning

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.

Coming in Month-1: a formal versioning policy and public changelog so breaking changes are announced ahead of time and existing integrations keep working.

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.