API Documentation

Verify every AI calculation in real-time. Production-ready infrastructure for mission-critical systems.

Base URL: https://qwed.tech/api

Authentication

All API requests require an API key. Include it in the Authorization header:

# HTTP Header
Authorization: Bearer YOUR_API_KEY

Get your API key: Email hello@qwed.tech to request access. Early partners get founder pricing locked forever.

Quick Start

Verify your first AI calculation in under 5 minutes:

1. Test the API

curl -X POST https://qwed.tech/api/verify \
  -H "Content-Type: application/json" \
  -d '{
    "question": "What is 2 + 2?",
    "llm_answer": "4"
  }'

2. Get Your Result

{
  "correct": true,
  "confidence": 1.0,
  "qwed_answer": 4.0,
  "domain": "arithmetic"
}

Verify Endpoint

The core endpoint for verifying AI calculations.

POST /api/verify

Request Body

Parameter Type Required Description
question string Yes The mathematical question
llm_answer string Yes The AI's answer to verify

Example Request

{
  "question": "What is 15% of 200?",
  "llm_answer": "30"
}

Response

Field Type Description
correct boolean Whether the LLM answer is correct
confidence number Confidence score (0.0 to 1.0)
qwed_answer any QWED's verified result
domain string Math domain detected

Supported Domains

QWED currently verifies calculations across 5 mathematical domains:

Domain Examples Use Cases
Arithmetic Addition, percentages, interest Financial calculators
Algebra Equations, systems Engineering tools
Statistics Mean, median, correlation Analytics dashboards
Geometry Area, volume, trigonometry CAD tools
Calculus Derivatives, integrals Scientific computing

Response Format

Success (200 OK)

{
  "correct": true,
  "confidence": 0.98,
  "qwed_answer": 42.5,
  "domain": "arithmetic"
}

Error Handling

Code Meaning
400 Bad Request
500 Server Error

Python Integration

import requests

response = requests.post(
    'https://qwed.tech/api/verify',
    json={
        'question': "What is 25% of 80?",
        'llm_answer': "20"
    }
)

result = response.json()
print(result['correct'])

Node.js Integration

const axios = require('axios');

const response = await axios.post(
  'https://qwed.tech/api/verify',
  {
    question: "Calculate 20% tip on $45",
    llm_answer: "$9"
  }
);

console.log(response.data.correct);

REST API (cURL)

curl -X POST https://qwed.tech/api/verify \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Area of circle radius 5?",
    "llm_answer": "78.54"
  }'

Ready to Get Certified?

Lock in founder pricing. First 100 companies get 50% off forever.

Get Your API Key