Lixxi
Developer API

Authoritative UK AI Accounting RAG API

Integrate grounded UK accounting intelligence — with full citations — into your apps, AI agents and workflows. Answers are only returned when they can be traced back to official UK sources.

Try in BrowserAPI Pricing

Built on UK law. Not the open web.

Every answer is traceable to primary legislation, HMRC manuals, or official government publications. No hallucinations. No unverified sources. Production-ready reliability.

Get Started

Follow these steps to make your first API call.

1

Create API Key

Sign up with your email and get your API key.

2

Make your first call

bash
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

json
{
  "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_KEY

Per Account

Keys are issued per account

Rotate Anytime

Rotate keys any time

Secure Storage

Stored securely (we don't expose them publicly)

Endpoints & Parameters

POST/v1/query

Submit a tax or VAT question and receive a grounded answer with citations.

Request Parameters

ParameterTypeRequiredDescription
questionstringYesYour tax or VAT question
max_tokensintegerNoMaximum length of answer
contextobjectNoAdditional filtering or metadata

Response

  • answer— plain text explanation
  • citations— array of citation objects

Citation Object

FieldTypeDescription
sourcestringName of the official source
referencestringSection/paragraph
urlstringLink to official publication
POST/v1/query/stream

Content-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 update
phasestringclassifying · searching · generating · tool_call · post_processing
messagestringHuman-readable progress description
toolCallNumberinteger?Present on tool_call phase only (1-based)
sources_foundKnowledge base search result count
totalSourcesintegerCumulative sources found so far
newSourcesintegerSources found in this search call
tokenStreamed answer fragment
deltastringAppend to your answer buffer to reconstruct the full response
metadataFinal answer metadata — emitted once, after all tokens
confidencestringhigh · medium · low · none
citationsCitation[]Same citation objects as the synchronous endpoint
authoritySummarystring?Human-readable description of source authority
citationCoveragenumber?0–1 fraction of claims covered by citations
warningsstring[]?Any caveats or freshness notices
costToken usage & billing breakdown — API keys only
inputTokensintegerPrompt tokens consumed
outputTokensintegerCompletion tokens generated
tokenCostPenceintegerRaw Bedrock token cost in pence
platformFeePenceintegerLixxi platform fee in pence
totalCostPenceintegerTotal charge for this query in pence
doneStream complete — no payload fields
errorPipeline or server error
codestringMachine-readable error code (e.g. TIMEOUT, INTERNAL_ERROR)
messagestringHuman-readable error description
retryablebooleanWhether it is safe to retry the same request

Code Examples

Choose your preferred language to see implementation examples.

cURL
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

200
OK
Successful request
400
Bad Request
Invalid input parameters
401
Unauthorized
Missing or invalid API key
429
Too Many Requests
Rate limit exceeded
500
Server Error
Unexpected server error

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%)

Input tokens
£2.76per 1M tokens
Output tokens
£13.80per 1M tokens

Platform Fee Per Query

VolumeFee per querySaving
Pay-as-you-go£0.06--
1,000+ queries/mo£0.0517%
5,000+ queries/mo£0.0433%
25,000+ queries/mo£0.0350%

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.

Simple lookup“What is the current VAT registration threshold?”
Input
£0.029
10,500 tokens
Output
£0.011
800 tokens
Platform fee
£0.060
Total
£0.10
Standard research“How is CGT calculated on a buy-to-let property sale?”
Input
£0.088
31,771 tokens
Output
£0.039
2,861 tokens
Platform fee
£0.060
Total
£0.19
Complex advisory“Analyse IR35 implications...”
Input
£0.128
46,500 tokens
Output
£0.058
4,200 tokens
Platform fee
£0.060
Total
£0.25

Cost Transparency Headers

Every API response includes headers showing the exact cost breakdown for that request.

Response Headers
X-Input-Tokens: 10500
X-Output-Tokens: 800
X-Token-Cost: 0.040
X-Platform-Fee: 0.060
X-Total-Cost: 0.100

All 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.

Cookie Settings

We use cookies and analytics to improve your experience and understand how you use our platform.

Privacy Policy