API

API

REST API for programmatic access to Mu.

Authentication: Authorization: Bearer YOUR_TOKENGet a token | MCP Server

Playground

Pick an endpoint, fill in parameters, and send the request.

GET /chat

Get Chat Info — Get available chat topics and summaries

Response: JSON

FieldTypeDescription
topicsarrayAvailable chat topics/categories
summariesobjectTopic summaries and context information
POST /chat

Chat — Chat with AI

ParamTypeDescription
contextarrayPast messages to use as context; [{'prompt': xxx, 'answer': xxx}]
promptstringPrompt to send the AI

Response: JSON

FieldTypeDescription
answerstringThe response from the AI
GET /news

News — Read the news

Response: JSON

FieldTypeDescription
feedarrayThe news feed
POST /news

News Search — Search for news articles

ParamTypeDescription
querystringNews search query

Response: JSON

FieldTypeDescription
querystringThe search query
resultsarrayArray of news article objects with id, title, description, url, category, image, published
countnumberNumber of results returned
GET /blog/post/{id}

Get Post — Get a single blog post by ID

Response: JSON

FieldTypeDescription
idstringPost ID
titlestringPost title
contentstringPost content (raw markdown)
authorstringAuthor name
author_idstringAuthor ID
created_atstringPost creation timestamp
PATCH /blog/post/{id}

Update Post — Update an existing blog post (author only)

ParamTypeDescription
titlestringPost title (optional)
contentstringPost content (minimum 50 characters)

Response: JSON

FieldTypeDescription
successbooleanWhether the post was updated successfully
idstringThe ID of the updated post
POST /blog/post

Create Post — Create a new blog post

ParamTypeDescription
titlestringPost title (optional)
contentstringPost content (minimum 50 characters)

Response: JSON

FieldTypeDescription
successbooleanWhether the post was created successfully
idstringThe ID of the created post
GET /blog

Blog — Get all blog posts

Response: JSON

FieldTypeDescription
postsarrayArray of post objects
GET /video

Video — Latest videos

Response: JSON

FieldTypeDescription
channelsarrayLatest videos
POST /video

Video Search — Search for videos

ParamTypeDescription
querystringVideo search query

Response: JSON

FieldTypeDescription
resultsarrayVideo search results
htmlstringPre-rendered html string of results
GET /token

List Tokens — List all Personal Access Tokens for authenticated user

Response: JSON

FieldTypeDescription
tokensarrayArray of token objects with id, name, created, last_used, expires_at, permissions
POST /token

Create Token — Create a new Personal Access Token for API automation

ParamTypeDescription
namestringToken name/description
permissionsarrayPermissions array (e.g., ['read', 'write']). Default: ['read', 'write']
expires_innumberExpiration in days (0 = never expires). Default: 0

Response: JSON

FieldTypeDescription
successbooleanWhether token was created
idstringToken ID
tokenstringThe actual token (SAVE IT - shown only once!)
namestringToken name
createdstringCreation timestamp
expires_atstringExpiration timestamp (if set)
permissionsarrayToken permissions
DELETE /token/{id}

Delete Token — Delete a Personal Access Token

Response: JSON

FieldTypeDescription
successbooleanWhether token was deleted
messagestringSuccess message
DELETE /blog/post/{id}

Delete Post — Delete a blog post (author only)

Response: JSON

FieldTypeDescription
successbooleanWhether the post was deleted
GET /@{username}

User Profile — Get user profile and their posts

Response: HTML

FieldTypeDescription
htmlstringRendered user profile page
POST /@{username}

Update User Status — Update user status message (own profile only)

ParamTypeDescription
statusstringStatus message (max 100 characters)

Response: Redirect

FieldTypeDescription
locationstringRedirects to user profile
POST /blog/post/{id}/comment

Add Comment — Add a comment to a blog post

ParamTypeDescription
contentstringComment content (minimum 10 characters)

Response: Redirect

FieldTypeDescription
locationstringRedirects back to the post
GET /search

Search Data — Search across all indexed content (posts, news, videos)

ParamTypeDescription
qstringSearch query

Response: JSON

FieldTypeDescription
resultsarraySearch results with type, id, title, content, score
POST /admin/flag

Flag Content — Flag inappropriate content

ParamTypeDescription
typestringContent type (post, comment)
idstringContent ID

Response: JSON

FieldTypeDescription
successbooleanWhether the flag was recorded
countnumberTotal flag count
GET /session

Session Status — Check authentication status (returns guest session if not authenticated)

Response: JSON

FieldTypeDescription
typestringSession type (account, token, anonymous)
accountstringAccount username if authenticated
GET /wallet?balance=1

Wallet Balance — Get wallet credit balance

Response: JSON

FieldTypeDescription
balancenumberCurrent credit balance (1 credit = 1p)
GET /wallet/topup

Wallet Topup — Get available wallet topup payment methods. Returns card (Stripe) preset tiers with amount, credits, and label. Requires authentication.

Response: JSON

FieldTypeDescription
methodsarrayArray of payment method objects. Each has a type (card) and tiers with amount, credits, and label.
GET /markets

Markets — Get live market prices for cryptocurrencies, futures, and commodities

ParamTypeDescription
categorystringCategory: crypto, futures, or commodities (default: crypto)

Response: JSON

FieldTypeDescription
categorystringThe requested category
dataarrayArray of market items with symbol, price, type
GET /weather

Weather Forecast — Get the weather forecast for a location by latitude and longitude. Costs 1 credit.

ParamTypeDescription
latnumberLatitude of the location
lonnumberLongitude of the location
pollenstringSet to 1 to include pollen forecast (+1 credit)

Response: JSON

FieldTypeDescription
forecastobjectWeather forecast with current conditions, hourly and daily items
pollenarrayPollen forecast by date (if requested)
POST /places/search

Places Search — Search for places by name or category, optionally near a location

ParamTypeDescription
qstringSearch query (e.g. cafe, pharmacy, Boots)
nearstringLocation name or address to search near (optional)
near_latnumberLatitude of the search location (optional)
near_lonnumberLongitude of the search location (optional)
radiusnumberSearch radius in metres, 100–5000 (default 1000)

Response: JSON

FieldTypeDescription
resultsarrayArray of place objects with id, name, category, address, lat, lon, phone, website, opening_hours, cuisine, distance
countnumberNumber of results returned
POST /places/nearby

Places Nearby — Find all places of interest near a given location

ParamTypeDescription
addressstringAddress or postcode to search near (optional if lat/lon provided)
latnumberLatitude of the search location
lonnumberLongitude of the search location
radiusnumberSearch radius in metres, 100–5000 (default 500)

Response: JSON

FieldTypeDescription
resultsarrayArray of place objects sorted by distance
countnumberNumber of results returned
latnumberResolved latitude
lonnumberResolved longitude
radiusnumberSearch radius used
GET /web

Web Search — Search the web using Brave Search. Requires authentication. Costs credits per query.

ParamTypeDescription
qstringSearch query

Response: JSON

FieldTypeDescription
resultsarrayArray of web result objects with title, url, description, age
querystringThe search query
POST /agent

Agent Query — Query the AI agent. The agent plans and executes tool calls (news, weather, places, markets, etc.) then synthesizes a response. Requires authentication. Costs credits per query. Returns a Server-Sent Events stream.

ParamTypeDescription
promptstringThe question or request for the agent
modelstringModel tier: standard (default) or premium

Response: text/event-stream

FieldTypeDescription
typestringEvent type: thinking, tool_start, tool_done, response, error, done
messagestringHuman-readable status message
htmlstringRendered HTML answer (on response event)
POST /mcp

MCP Server — Model Context Protocol server for AI tool integration. Supports initialize, tools/list, tools/call, and ping methods. Tools include chat, news, blog, video, mail, search, wallet, weather, places, markets, reminder, login, and signup. Metered tools (chat: 5 credits, news_search: 1 credit, video_search: 2 credits, mail_send: 4 credits, weather_forecast: 1 credit + optional 1 credit for pollen data) use the same wallet credit system as the REST API. Pay per call via x402 or top up your account to pay with credits.

ParamTypeDescription
jsonrpcstringJSON-RPC version (must be '2.0')
idnumberRequest ID
methodstringMCP method: initialize, tools/list, tools/call, ping
paramsobjectMethod parameters (e.g. {name, arguments} for tools/call)

Response: JSON

FieldTypeDescription
jsonrpcstringJSON-RPC version '2.0'
idnumberRequest ID echoed back
resultobjectMethod result (tools list, tool output, server info)
errorobjectError object with code and message (if failed)