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.

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.

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 API Dashboard.

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

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)

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
429Too Many Requests - Rate limit exceeded
500Server Error - Something went wrong