API Documentation
Access our powerful math APIs to integrate advanced computational capabilities into your applications.
Getting Started
Authentication
Obtain an API key from your dashboard. All requests must include the API key in the Authorization header using Bearer authentication.
Get API KeyBase URL
All API endpoints are available under the following base URL:
api.mathema.tika/v2
Available Endpoints
POST /compute
Performs symbolic and numeric computations.
Request Body
{ "expression": "integrate(x^2, x)", "format": "latex", "timeout": 30 }
Response
{ "result": "x^3/3 + C", "success": true, "time_taken": 0.12 }
GET /history/{session_id}
Retrieves computation history for a session.
Example
GET /history/5z8x3lq9 Response: { "session_id": "5z8x3lq9", "queries": ["solve(2x+3=5)", "plot(sin(x))"], "created_at": "2025-09-13T10:30:45Z" }
POST /auth/token
Generates a short-lived access token for API authentication.
Request Body
{ "api_key": "abc123xyz789", "duration_seconds": 3600 }
Response
{ "access_token": "ey123...xyz789", "expires_in": 3600, "token_type": "Bearer" }
Error Handling
HTTP Status codes
- 400 Bad Request - Invalid arguments or syntax errors in expression
- 401 Unauthorized - Missing or invalid API key
- 429 Too Many Requests - Rate limit exceeded
Common JSON Errors
{ "error": "timeout_exceeded", "details": "Calculation took longer than 60 seconds" }
Rate Limits
Free tier is limited to 1000 requests per hour. Enterprise customers get priority access with custom limits.
How to Check Your Limit Status
GET /rate-limit Authorization: Bearer YOURKeyHere { "remaining": 952, "reset_time": "2025-09-13T15:45:12Z" }