Get Started
Follow these steps to make your first API call.
Create API Key
Sign up with your email and get your API key.
Make your first call
curl https://api.yoursite.com/v1/query \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is the UK VAT rate for digital services?",
"max_tokens": 500
}'Sample Response
{
"answer": "The standard UK VAT rate is 20% for digital services...",
"citations": [
{
"source": "VAT Notice 700/1",
"reference": "Section 3.2",
"url": "https://www.gov.uk/guidance/vat-notice-7001"
},
{
"source": "UK VAT Act 1994",
"reference": "Schedule 1",
"url": "https://www.legislation.gov.uk/ukpga/1994/23/schedule/1"
}
]
}Why this matters: Your first integration should be friction-free — see real data instantly.
Authentication
API Key-Based Auth
All requests must include an API key:
Authorization: Bearer YOUR_API_KEYPer Account
Keys are issued per account
Rotate Anytime
Rotate keys any time
Secure Storage
Stored securely (we don't expose them publicly)
Endpoints & Parameters
/v1/querySubmit a tax or VAT question and receive a grounded answer with citations.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
question | string | Yes | Your tax or VAT question |
max_tokens | integer | No | Maximum length of answer |
context | object | No | Additional filtering or metadata |
Response
answer— plain text explanationcitations— array of citation objects
Citation Object
| Field | Type | Description |
|---|---|---|
source | string | Name of the official source |
reference | string | Section/paragraph |
url | string | Link to official publication |
/v1/query/streamContent-Type: text/event-stream
Same request body as /v1/query. Returns a stream of Server-Sent Events (SSE) so you can display the answer token-by-token as it is generated. Each frame carries an event: type and a JSON data: payload.
Request
Identical to /v1/query — pass question in the JSON body with your X-API-Key header.
SSE Event Types
statusPipeline progress updatephase | string | classifying · searching · generating · tool_call · post_processing |
message | string | Human-readable progress description |
toolCallNumber | integer? | Present on tool_call phase only (1-based) |
sources_foundKnowledge base search result counttotalSources | integer | Cumulative sources found so far |
newSources | integer | Sources found in this search call |
tokenStreamed answer fragmentdelta | string | Append to your answer buffer to reconstruct the full response |
metadataFinal answer metadata — emitted once, after all tokensconfidence | string | high · medium · low · none |
citations | Citation[] | Same citation objects as the synchronous endpoint |
authoritySummary | string? | Human-readable description of source authority |
citationCoverage | number? | 0–1 fraction of claims covered by citations |
warnings | string[]? | Any caveats or freshness notices |
costToken usage & billing breakdown — API keys onlyinputTokens | integer | Prompt tokens consumed |
outputTokens | integer | Completion tokens generated |
tokenCostPence | integer | Raw Bedrock token cost in pence |
platformFeePence | integer | Lixxi platform fee in pence |
totalCostPence | integer | Total charge for this query in pence |
doneStream complete — no payload fieldserrorPipeline or server errorcode | string | Machine-readable error code (e.g. TIMEOUT, INTERNAL_ERROR) |
message | string | Human-readable error description |
retryable | boolean | Whether it is safe to retry the same request |
Code Examples
Choose your preferred language to see implementation examples.
curl https://api.yoursite.com/v1/query \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What is the UK VAT rate for digital services?",
"max_tokens": 500
}'What this does:
- Sends a POST request to the /v1/query endpoint
- Includes your API key in the Authorization header
- Returns a grounded answer with full citations
Error Handling
Common Status Codes
Best Practice Tips
Retry on 5xx errors
Implement exponential backoff when encountering server errors
Log errors for diagnostics
Keep detailed logs of API errors for debugging and monitoring
Track request IDs
Use the request ID returned in responses for support inquiries
Rate Limits
Usage Tracking
Every successfully grounded answer counts toward your usage and is billed per query.
If an answer is refused due to lack of official grounding, you are not billed.
Pricing
Transparent, usage-based pricing. You pay for the tokens you use plus a small platform fee per query.
Free Trial
50 queries over 30 days — no credit card required.
Enough to build and test a working integration. No ongoing free tier — upgrade to PAYG when your trial ends.
Token Pass-Through + Platform Fee
Every query has two cost components: the tokens consumed by the LLM, and a flat platform fee.
Token Rates (Bedrock + 15%)
Platform Fee Per Query
| Volume | Fee per query | Saving |
|---|---|---|
| Pay-as-you-go | £0.06 | -- |
| 1,000+ queries/mo | £0.05 | 17% |
| 5,000+ queries/mo | £0.04 | 33% |
| 25,000+ queries/mo | £0.03 | 50% |
Volume discounts apply to the platform fee only — token pass-through stays fixed.
Token rates are a direct pass-through of AWS Bedrock pricing + 15%. You can verify against published Bedrock rates.
Worked Examples
Real query costs at PAYG rates, so you know exactly what to expect.
Cost Transparency Headers
Every API response includes headers showing the exact cost breakdown for that request.
X-Input-Tokens: 10500
X-Output-Tokens: 800
X-Token-Cost: 0.040
X-Platform-Fee: 0.060
X-Total-Cost: 0.100All cost values are in GBP. Use these headers to build real-time cost dashboards or set budget alerts in your application.
Best Practices
Tips for reliable integration and optimal performance.
Cache Canonical Answers
Cache frequently requested answers where possible to reduce API calls and improve response times.
Respect Rate Limit Headers
Monitor rate limit headers in responses and implement appropriate throttling in your application.
Use Batching for High Volume
If you have high volume requirements, contact us about batch processing options.
Test in Sandbox First
Always test your integration thoroughly in a sandbox environment before deploying to production.
Common Integration Patterns
Modal/Dialog UI
Embed the API in a modal window for contextual tax guidance within your application.
Assistant Chat Interface
Build a conversational assistant that leverages the API for tax-related queries.
Backend Pipeline
Use the API as part of automated compliance checks or document processing workflows.
Knowledge Base Enhancement
Augment your existing knowledge base with real-time, cited tax information.
Developer FAQ
Common questions from developers integrating our API.
Security & Compliance
Your data security and privacy are our top priorities.
GDPR Compliant
Fully compliant with UK GDPR and data protection regulations. All data processing follows strict privacy standards.
ISO-Aligned Policies
Our security practices align with ISO 27001 standards for information security management.
Secure Key Storage
API keys are encrypted at rest and in transit. We never expose keys publicly or in logs.
Access Logs Available
Comprehensive audit logs for all API requests are available in your dashboard for compliance tracking.
Data Handling
Query Storage
Queries are retained for 90 days for quality improvement, then automatically deleted unless required for legal compliance.
No Training Data
Your queries are never used to train models or shared with third parties. Your data remains private.
Encryption
All API communications use TLS 1.3. Data at rest is encrypted using AES-256 encryption.
Regular Audits
We conduct regular security audits and penetration testing to ensure platform integrity.