---
source_url: "https://miapi.uk/?utm_source=openai"
title: MIAPI — Grounded AI Answers API
mirrored_at: 2026-08-08T03:34:29.396Z
host: miapi.uk
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/miapi.uk/index__q__utm_source_openai"
---

> **Original source:** https://miapi.uk/?utm_source=openai

MIAPI

API v1.6 — Beats Perplexity at 60% less cost

## AI Answers Grounded  
in Real-Time Search

One API call. Web-grounded answers with inline citations, sources, and confidence scores. OpenAI-compatible. Built for developers.

~1.1s

Avg Response

10+

Endpoints

98%

Accuracy

$0.0025

As Low As / Query

## Quick Start

Get a grounded AI answer in one API call.

curl \-X POST https://api.miapi.uk/v1/answer \\
  \-H "Content-Type: application/json" \\
  \-H "Authorization: Bearer YOUR\_API\_KEY" \\
  \-d '{
    "question": "What is quantum computing?",
    "citations": true,
    "include\_sources": true
  }'

import requests

response = requests.post(
    "https://api.miapi.uk/v1/answer",
    headers={"Authorization": "Bearer YOUR\_API\_KEY"},
    json={
        "question": "What is quantum computing?",
        "citations": True
    }
)

data = response.json()
print(data\["answer"\])
\# "Quantum computing uses qubits to perform calculations \[1\]..."
print(data\["sources"\])
\# \[{"title": "...", "url": "...", "snippet": "..."}\]

const response = await fetch("https://api.miapi.uk/v1/answer", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR\_API\_KEY"
    },
    body: JSON.stringify({
        question: "What is quantum computing?",
        citations: true
    })
});

const data = await response.json();
console.log(data.answer);  // Grounded answer with \[1\]\[2\] citations
console.log(data.sources); // Array of source URLs

\# Just change base\_url — your existing OpenAI code works instantly
from openai import OpenAI

client = OpenAI(
    api\_key="YOUR\_MIAPI\_KEY",
    base\_url="https://api.miapi.uk/v1"  \# ← just this line
)

response = client.chat.completions.create(
    model="miapi-grounded",
    messages=\[{"role": "user", "content": "What is quantum computing?"}\]
)

print(response.choices\[0\].message.content)
\# Real-time web-grounded answer with citations!

## Built for Developers

Everything you need in one API. Nothing you don't.

🔍

### Web-Grounded Answers

Every answer is backed by real-time web search. No hallucinations. Sources included with every response.

📎

### Inline Citations

Get answers with \[1\]\[2\] citation markers linked to sources. Professional, verifiable, trustworthy.

🤖

### OpenAI Compatible

Drop-in replacement for /v1/chat/completions. Change one URL and your existing code works instantly.

📚

### Knowledge Mode

Pass your own documents. Get answers from your data, web search, or both combined. Perfect for RAG.

🌊

### Streaming

Real-time Server-Sent Events streaming. Show answers as they generate, just like ChatGPT.

🔎

### Search-Only Mode

Get raw search results without LLM processing. Bring your own model. Built for LangChain and RAG pipelines.

📰

### News Search

Dedicated news endpoint with article dates, sources, and snippets. Real-time news intelligence.

🖼️

### Image Search

Find images from across the web with titles, thumbnails, dimensions, and source URLs.

⚡

### Fast & Cached

~1.5s average response. Built-in caching with X-Cache headers. Repeat queries return in 1ms.

## Cheapest on the Market

Compare us to every grounded AI API. We include everything they charge extra for.

Provider

AI Answer

Citations

Knowledge Mode

News Search

OpenAI Compat

Streaming

Per 1,000 queries

MIAPI ⚡

✓

✓

✓

✓

✓

✓

$2.50–3.60

Perplexity Search

✗

✓

✗

✗

✓

✓

~$5–12

Brave AI Grounding

✓

✗

✗

✓

✗

✗

~$5–8

Perplexity Sonar Pro

✓

✓

✗

✗

✓

✓

~$8–15

Exa.ai Answer API

✓

✗

✗

✗

✗

✗

~$5–25

Tavily Search

✓

✗

✗

✓

✗

✗

$8.00

Google Grounding API

✓

✓

✗

✗

✗

✓

$14–35

MIAPI is the only API with all 6 features at the lowest price point.

## Live Playground

Try MIAPI right now. No signup required for the demo.

Question

Demo: 5 queries per minute limit. Sign up for full access.

Format

Include citations \[1\]\[2\] Include sources

Response

Click "Send Request" to try the API...

## API Reference

Complete documentation for every endpoint.

Base URL

https://api.miapi.uk

Authentication

Authorization: Bearer YOUR\_API\_KEY

The core endpoint. Searches the web, synthesizes an AI answer with sources and confidence scores.

#### Parameters

Name

Type

Required

Description

question

string

required

The question to answer (2-1000 chars)

mode

string

optional

`answer` (default), `search` (raw results), `knowledge` (from your text)

citations

boolean

optional

Include \[1\]\[2\] citation markers. Default: false

knowledge

string

optional

Custom context (up to 10K chars). Used alongside or instead of web search.

system\_prompt

string

optional

Custom system prompt for the AI (max 2000 chars)

response\_format

string

optional

`text`, `short`, `json`, `markdown`

temperature

float

optional

0.0 to 1.0 (default 0.3)

max\_tokens

integer

optional

50-2000 (auto if not set)

include\_sources

boolean

optional

Include source URLs. Default: true

search\_domains

array

optional

Restrict search to specific domains, e.g. \["wikipedia.org"\]

exclude\_domains

array

optional

Block specific domains from results, e.g. \["reddit.com", "wikipedia.org"\]

language

string

optional

Force response language, e.g. "Spanish", "French"

context

array

optional

Conversation history for follow-up questions

#### Response

{
  "answer": "Quantum computing uses qubits... \[1\]\[2\]",
  "sources": \[
    {"title": "...", "url": "...", "snippet": "..."}
  \],
  "confidence": 0.9,
  "cached": false,
  "query\_time\_ms": 1200,
  "mode": "answer",
  "request\_id": "req\_abc123..."
}

#### Response Headers

X-Request-ID

Unique request identifier for debugging

X-Cache

HIT or MISS — whether the response was cached

X-Response-Time

Server processing time (e.g. "1200ms")

X-MIAPI-Version

API version (e.g. "1.6.0")

Drop-in replacement for OpenAI's chat completions. All answers are web-grounded with citations.

Name

Type

Required

Description

messages

array

required

Array of {role, content} messages

model

string

optional

"miapi-grounded" (default)

stream

boolean

optional

Enable SSE streaming

temperature

float

optional

0.0-1.0

max\_tokens

integer

optional

50-2000

Real-time streaming via Server-Sent Events. Sends sources first, then streams the answer token by token.

Same parameters as /v1/answer. Events: `sources` → `answer` (multiple) → `done`

Name

Type

Required

Description

query

string

required

News search query

num\_results

integer

optional

1-20 (default 5)

Returns: articles with title, url, snippet, date, source name.

Name

Type

Required

Description

query

string

required

Image search query

num\_results

integer

optional

1-20 (default 5)

Returns: images with title, url, thumbnail, source, width, height.

Returns raw search results without LLM processing. Ideal for LangChain, RAG pipelines, or bring-your-own-model setups.

Name

Type

Required

Description

query

string

required

Search query

num\_results

integer

optional

1-20 (default 7)

search\_domains

array

optional

Restrict to specific domains

exclude\_domains

array

optional

Block specific domains from results

Public demo endpoint, no API key required. Rate limited to 20 queries/min per IP. Max 500 char questions, 200 token responses.

Name

Type

Required

Description

question

string

required

Question (2-500 chars)

include\_sources

boolean

optional

Include source URLs. Default: true

response\_format

string

optional

text, short, markdown, json

Returns all available model identifiers. OpenAI-compatible format. No request body needed.

List, create, and revoke API keys on your account. Returns key metadata including creation date, usage count, and rate limit.

Returns queries today, this month, rate limit, tier, and monthly limit. No request body needed.

## Simple Pricing

Buy query packs. Use them anytime. No subscriptions, no expiry.

Free

$0

-   500 queries / month
-   1 API key
-   60 req/min
-   All endpoints
-   Refills monthly

[Get Free Key](https://miapi.uk/signup.html)

Starter

$9

-   2,500 queries
-   $3.60 per 1,000
-   5 API keys
-   120 req/min
-   Never expires

[Buy Queries](https://miapi.uk/signup.html)

Developer

$33

-   10,000 queries
-   $3.30 per 1,000
-   5 API keys
-   120 req/min
-   Never expires

[Buy Queries](https://miapi.uk/signup.html)

Pro

$90

-   30,000 queries
-   $3.00 per 1,000
-   5 API keys
-   120 req/min
-   Never expires

[Buy Queries](https://miapi.uk/signup.html)

Scale

$250

-   100,000 queries
-   $2.50 per 1,000
-   5 API keys
-   120 req/min
-   Never expires

[Buy Queries](https://miapi.uk/signup.html)

Enterprise

Custom

-   Volume discounts
-   Unlimited API keys
-   Custom rate limits
-   SLA guarantee
-   On-premise option

[Contact Sales](mailto:nadir@miapi.uk)

All queries are one-time purchases. No subscriptions. Buy more anytime. Prices range from $2.50 to $3.60 per 1,000 queries.

## Python SDK

Install and start querying in 30 seconds.

$ pip install miapi-sdk

Full-featured Python client with sync and async support, streaming, and all endpoints.

from miapi import MIAPI

client = MIAPI("YOUR\_API\_KEY")

\# Grounded answer with citations
result = client.answer("What is CRISPR?", citations=True)
print(result.answer)
print(result.sources)

\# Knowledge mode — answer from your data
result = client.answer(
    "What is the return policy?",
    mode="knowledge",
    knowledge="Returns accepted within 30 days..."
)

\# Search only — raw results for your pipeline
results = client.search("latest AI research papers")
for source in results:
    print(source.url)

\# News search
news = client.news("technology", num\_results=5)

\# Image search
images = client.images("golden retriever")

## MCP Integration

Plug MIAPI into any MCP-compatible AI assistant — Cursor, Claude Desktop, Windsurf, and more.

$ pip install "mcp\[cli\]" httpx

Download the server file, set your API key, and your AI assistant gets web search with citations built in.

## Get in Touch

Questions, feedback, or partnership inquiries — we'd love to hear from you.