Skip to content
Mekler AIGet started

Mekler AI / Framework integration

Use Mekler with your framework.

Wrap the HTTPS API in your framework’s tool functions. The service contract is the same whichever model plans the work. Your runtime needs network access and, for signed execution, a compatible wallet signer.

1. Discover a capability

Read the compact index, choose an operation, then retrieve its complete contract from the catalog or OpenAPI. These examples perform free, read-only discovery.

Python · standard library
import json
from urllib.request import urlopen

# Public discovery only: this does not purchase a service.
with urlopen("https://api.mekler.ai/agent-index.json", timeout=20) as response:
    index = json.load(response)
for operation in index["operations"]:
    print(operation["id"], operation["task"], operation["price"])
JavaScript · Node.js 18 or newer
// Public discovery only: this does not purchase a service.
const response = await fetch("https://api.mekler.ai/agent-index.json");
if (!response.ok) throw new Error(`Discovery failed: ${response.status}`);
const index = await response.json();
for (const operation of index.operations) {
  console.log(operation.id, operation.task, operation.price);
}

2. Execute with the right client

Try selected services

The Python trial client signs an explicit trial request locally. It has no payment fallback and can be run from any framework with a suitable execution environment.

Choose a trial →

Buy model inference

Use the budgeted Python client or its local MCP server. It preserves the original payment proof and purchase journal for recovery.

Read the inference guide →

For other paid operations, implement the selected operation’s x402 signing and recovery contract. A generic HTTP tool or a discovered service is not a complete payment integration. Referral attribution has additional signing requirements.

3. Keep retries safe

Save the original request and proof before transmission. Retry or recover that same work after an interruption; do not create a replacement purchase. Trial requests retain the same input and request ID.

Read the API reference → · Referral-aware client requirements →

Choose a service and get a first result →