API Documentation
Everything you need to integrate invok.it into your AI agent.
🚀 Getting Started
Register, search, invoke
🔍 Search API
Find tools by capability
⚡ Invoke API
Call tools through proxy
Getting Started
Base URL
1. Register a Publisher Account
curl -X POST BASE_URL/v1/publishers/register \
-H "Content-Type: application/json" \
-d '{
"name": "My AI Agent",
"slug": "my-ai-agent"
}'
# Response:
# {
# "data": {
# "publisher": { "id": "...", "name": "My AI Agent", "slug": "my-ai-agent" },
# "api_key": "atm_xxxxxxxxxxxxx" ← Save this!
# }
# }
Python Client
import requests
BASE = "BASE_URL/v1"
API_KEY = "atm_xxxxxxxxxxxxx"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
# Register
resp = requests.post(f"{BASE}/publishers/register", json={
"name": "My Agent", "slug": "my-agent"
})
api_key = resp.json()["data"]["api_key"]
Search API
POST
/v1/tools/search
Semantic search for tools. No authentication required.
curl
curl -X POST BASE_URL/v1/tools/search \
-H "Content-Type: application/json" \
-d '{
"query": "translate text to another language",
"filters": {
"categories": ["nlp"],
"min_quality_score": 0.7
},
"page": 1,
"per_page": 10
}'
Python
resp = requests.post(f"{BASE}/tools/search", json={
"query": "translate text to another language",
"filters": {"categories": ["nlp"], "min_quality_score": 0.7},
"page": 1,
"per_page": 10
})
tools = resp.json()["data"]
for tool in tools:
print(f"{tool['name']} (quality: {tool['quality_score']})")
Response Schema
{
"data": [
{
"id": "uuid",
"slug": "google-translate",
"name": "Google Translate",
"capability_summary": "Translates text between 100+ languages",
"quality_score": 0.92,
"tags": ["nlp", "translation"],
"latest_version": {
"version": "1.0.0",
"endpoint_method": "POST",
"auth_type": "api_key"
}
}
],
"pagination": { "page": 1, "per_page": 10, "total": 5, "total_pages": 1 }
}
Get Tool Details
GET
/v1/tools/{slug}
curl BASE_URL/v1/tools/google-translate
# Python
tool = requests.get(f"{BASE}/tools/google-translate").json()["data"]
print(f"Input schema: {tool['versions'][0]['input_schema']}")
print(f"Output schema: {tool['versions'][0]['output_schema']}")
Invoke API (Transparent Proxy)
POST
/v1/invoke/{tool_slug}
Auth Required
Invoke any tool through the marketplace proxy. The marketplace adds circuit breaker protection, metrics tracking, and automatic failover.
curl
curl -X POST BASE_URL/v1/invoke/google-translate \
-H "Authorization: Bearer atm_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"text": "Hello world", "target_lang": "fr"}'
# Response headers include:
# X-Marketplace-Latency-Ms: 234
# X-Marketplace-Tool-Version: 1.0.0
# X-Circuit-Breaker-Status: closed
Python
resp = requests.post(
f"{BASE}/invoke/google-translate",
headers=headers,
json={"text": "Hello world", "target_lang": "fr"}
)
result = resp.json()
print(f"Latency: {resp.headers.get('X-Marketplace-Latency-Ms')}ms")
print(f"Circuit breaker: {resp.headers.get('X-Circuit-Breaker-Status')}")
Circuit Breaker
When a tool fails repeatedly, the circuit breaker opens and returns a 503 with CIRCUIT_OPEN code plus alternative tools. Your agent should handle this by trying the suggested alternatives.
Other Endpoints
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /v1/categories | No | List categories |
| GET | /v1/meta/types | No | Type registry |
| GET | /v1/tools/{slug}/metrics | No | Tool metrics |
| GET | /v1/tools/{slug}/quality | No | Quality breakdown |
| GET | /v1/tools/{slug}/alternatives | No | Alternative tools |
| POST | /v1/tools/import | Yes | Import tool (3 methods) |
| POST | /v1/publishers/register | No | Register publisher |
| GET | /v1/health | No | Health check |