March 17, 20263 min read

The Complete Guide to the ToolKnife API

Everything you need to know about the ToolKnife REST API. Authentication, endpoints, rate limits, error handling, and code examples for every category.

apidevelopertutorial

ToolKnife exposes 273+ tools as a REST API. Every calculator, converter, and developer utility you see on the website is available programmatically.

This guide covers authentication, endpoint patterns, error handling, and examples for each tool category.

Base URL

https://toolknife.com/api/v1/tools

All endpoints follow the same pattern:

POST /api/v1/tools/{tool-slug}_{function-name}

The tool slug and function name are separated by an underscore. Find the exact endpoint for any tool in the interactive API docs.

Authentication

Free tier (no auth required):

curl -X POST https://toolknife.com/api/v1/tools/bmi-calculator_calculate-bmi \
  -H "Content-Type: application/json" \
  -d '{"weight": 75, "height": 175, "unit": "metric"}'

200 calls/day per IP. No signup, no API key.

Pro/Business tier (API key):

curl -X POST https://toolknife.com/api/v1/tools/bmi-calculator_calculate-bmi \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tk_live_abc123..." \
  -d '{"weight": 75, "height": 175, "unit": "metric"}'

Get your API key from the dashboard.

Rate limits

Tier Daily limit Monthly equivalent
Free (no key) 200 ~6,000
Pro ($19/mo) 5,000 150,000
Business ($79/mo) 50,000 1,500,000

Rate limit headers are included in every response:

X-RateLimit-Limit: 200
X-RateLimit-Remaining: 198
X-RateLimit-Reset: 1711152000

When you hit the limit, the API returns 429 Too Many Requests with a retry-after header.

Response format

All endpoints return JSON:

{
  "monthlyPayment": 2023.65,
  "totalPayment": 728515.57,
  "totalInterest": 408515.57,
  "loanAmount": 320000
}

On error:

{
  "error": "Invalid input",
  "details": [
    {
      "field": "annualRate",
      "message": "Expected number, received string"
    }
  ]
}

Error codes:

  • 400 - Invalid input (check the details array)
  • 401 - Invalid API key
  • 429 - Rate limit exceeded
  • 500 - Server error (rare)

Category examples

Finance

# Compound interest with monthly contributions
curl -X POST https://toolknife.com/api/v1/tools/compound-interest-calculator_calculate-compound-interest \
  -H "Content-Type: application/json" \
  -d '{
    "principal": 10000,
    "rate": 7,
    "years": 20,
    "compoundingFrequency": 12,
    "monthlyContribution": 500
  }'

Math

# Solve a quadratic equation
curl -X POST https://toolknife.com/api/v1/tools/quadratic-equation-solver_solve \
  -H "Content-Type: application/json" \
  -d '{"a": 1, "b": -5, "c": 6}'

Health

# Calculate daily calorie needs
curl -X POST https://toolknife.com/api/v1/tools/calorie-calculator_calculate-calories \
  -H "Content-Type: application/json" \
  -d '{
    "weight": 75,
    "height": 175,
    "age": 30,
    "gender": "male",
    "activityLevel": "moderate"
  }'

Developer

# Generate a UUID
curl -X POST https://toolknife.com/api/v1/tools/uuid-generator_generate-uuid \
  -H "Content-Type: application/json" \
  -d '{"version": "v4", "count": 5}'

Conversion

# Convert temperature
curl -X POST https://toolknife.com/api/v1/tools/temperature-converter_convert \
  -H "Content-Type: application/json" \
  -d '{"value": 100, "from": "fahrenheit", "to": "celsius"}'

Science

# Calculate molarity
curl -X POST https://toolknife.com/api/v1/tools/molarity-calculator_calculate-molarity \
  -H "Content-Type: application/json" \
  -d '{"soluteMass": 58.44, "molarMass": 58.44, "volumeLiters": 1}'

Client libraries

No official SDKs (the API is simple enough that you do not need one). Use any HTTP client:

Python:

import requests

def toolknife(tool_function: str, params: dict, api_key: str = None):
    headers = {"Content-Type": "application/json"}
    if api_key:
        headers["Authorization"] = f"Bearer {api_key}"

    resp = requests.post(
        f"https://toolknife.com/api/v1/tools/{tool_function}",
        json=params,
        headers=headers,
    )
    resp.raise_for_status()
    return resp.json()

# Usage
result = toolknife("mortgage-calculator_calculate-mortgage", {
    "principal": 400000,
    "annualRate": 6.5,
    "years": 30,
    "downPayment": 80000,
})

JavaScript/TypeScript:

async function toolknife(toolFunction: string, params: Record<string, unknown>, apiKey?: string) {
  const headers: Record<string, string> = { "Content-Type": "application/json" };
  if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;

  const resp = await fetch(
    `https://toolknife.com/api/v1/tools/${toolFunction}`,
    { method: "POST", headers, body: JSON.stringify(params) }
  );

  if (!resp.ok) throw new Error(`API error: ${resp.status}`);
  return resp.json();
}

MCP (for AI agents)

If you are building with Claude, GPT, or any MCP-compatible agent framework, the same tools are available as an MCP server:

{
  "mcpServers": {
    "toolknife": {
      "type": "streamable-http",
      "url": "https://toolknife.com/api/mcp"
    }
  }
}

Same rate limits, same tools, different protocol. The agent discovers available tools automatically.

OpenAPI spec

The full OpenAPI 3.1 spec is available at:

https://toolknife.com/api/v1/openapi

Import it into Postman, Insomnia, or any OpenAPI client to explore endpoints with auto-generated request builders.


Browse the interactive API docs or get an API key.