Skip to content
Mekler AIGet started

Mekler AI / Model Inference

Service details

Model Inference

Generate model completions with automatic task-based model selection, explicit model choice and parallel batches

Example: 0.001939 USDC per completed purchase; example shown, exact quote required

Paid only. No free trial for this operation.

This operation needs paid setup. New to Mekler? Start with a free sample task →

Know its boundaries.

  • Streaming
  • Tool calls
  • Browsing
  • Images or audio
  • Dependent task orchestration
  • Guaranteed factual correctness

Data handling

Inputs

Prompts go only to the provider disclosed in the accepted plan: direct OpenAI or AWS Bedrock in us-east-1. No provider credentials shared.

Storage

Private jobs and artifacts encrypted at rest. Recovery access expires after 30 days; deletion follows storage lifecycle.

Telemetry

No prompts, outputs, proofs, private tokens or source addresses in logs.

Supplier

Applicable provider processing/abuse-monitoring terms apply. No zero-retention promise. Customer content is not used to construct the qualification dataset.

Input example and exact contract
{
  "tasks": [
    {
      "messages": [
        {
          "role": "user",
          "content": "Summarize: the meeting starts at noon."
        }
      ],
      "task": "summarize",
      "max_output_tokens": 64
    }
  ],
  "max_price_usdc": "0.003"
}

API reference: input, output and error schemas →

Example output
{
  "job_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "state": "complete",
  "plan": {
    "version": "inference-v4-purchase",
    "models": [
      {
        "index": 0,
        "model": "gpt-6-luna",
        "provider_model": "gpt-6-luna",
        "reason": "bounded_general_task",
        "reasoning_effort": "none",
        "input_token_allowance": 326,
        "max_output_tokens": 64,
        "response_format": "text"
      }
    ],
    "price_micros": 1939,
    "delivery_policy": "Stored results delivered after independently verified payment inclusion; finality reconciles separately.",
    "processing": "OpenAI direct API; store=false; standard processing",
    "output_policy": "Complete text or JSON object; refusals, truncation and any failed item are uncharged."
  },
  "recovery_token": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
  "expires_at": 1794528000,
  "retry": "Recover with the original proof or private token. Do not pay again.",
  "results": [
    {
      "index": 0,
      "model": "gpt-6-luna",
      "provider_model": "gpt-6-luna",
      "reported_model": "gpt-6-luna",
      "content": "The meeting starts at noon.",
      "finish_reason": "stop",
      "usage": {
        "prompt_tokens": 18,
        "completion_tokens": 7,
        "total_tokens": 25
      }
    }
  ],
  "receipt": {
    "network": "eip155:8453",
    "transaction": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
    "price_micros": 1939,
    "finalized": true
  }
}
Calling, result interpretation and recovery

Calling

Content type

application/json

Retrieval prerequisite

Call retrieve-result only after an admitted job returns job_id and recovery_token. Example identifiers are synthetic. Retrieve with exactly job_id in the query and X-Mekler-Recovery in the header; a quote alone creates no job.

Method

POST

Url

https://api.mekler.ai/v1/compute/inference/generate-completions

Steps
  • POST the intended JSON unsigned. The 402 includes the original recommended quote and menu.options sorted by exact total price.

  • For the original quote, sign PAYMENT-REQUIRED and resend identical JSON. For a menu choice, sign one offer in that option.payment_required and POST exactly option.request with PAYMENT-SIGNATURE. Never mix an option proof with another request.

  • Save job_id and private recovery_token from 202. Poll retrieve-result with X-Mekler-Recovery, or resend the original body/proof.

  • Use results from 200. receipt.finalized=false means delivery succeeded while financial finality is pending. Never sign again for a pending or delivered job.

Retry

Resend original input and proof, or use the private job recovery token.

Interpret the result

Routing

Versioned rules, not a guarantee of the best model. Model and reason disclosed before signing.

Pricing

Fixed purchase based on input allowance and output ceiling. No rebate for unused tokens. Actual provider usage is returned.

Quality

Model outputs may be inaccurate. Refusals, truncation, invalid JSON and incomplete batches are uncharged.

Limits

Tasks

1–20 independent tasks

Input

At most 16000 UTF-8 content bytes per task; last message must be user.

Output

32–4096 billed output tokens per task

Body bytes

196608

Deadline

15-second queue admission and 40-second supplier work window; unfinished work is uncharged.

Payment and recovery

Price

Exact request-specific price, no fixed purchase minimum; maximum 1 USDC.

Network

Solana mainnet or Base mainnet

Protocol

x402 v2 exact

Quote

Send the intended JSON body without PAYMENT-SIGNATURE. A 402 PAYMENT-REQUIRED header contains two network offers; bodyless preflight is not payable.

Authorization

Choose one accepts entry with a standard x402 v2 client. Check native USDC, network, recipient, amount and intended input before signing. Solana uses an SVM transaction; Base uses an EOA EIP-3009 authorization (USD Coin version 2). Send the proof with identical JSON input. No API key, token approval, bridge or Solana wallet is needed for Base. Never automatically fall back to another network.

Retry

Retry identical JSON and the original proof after uncertainty. Source failures before settlement are uncharged.

Finality

202 is pending. 200 delivers stored results after independent payment inclusion or finality. receipt.finalized distinguishes the two; reconciliation continues without another payment.

Expiry

Quotes and payment authorizations expire independently of the 30-day stored-result recovery window.

Networks
  • solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp

  • eip155:8453

Assets
Solana:5eykt4usfv8p8njdtrepy1vzqkqzkvdp

EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Eip155:8453

0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Fees

CDP sponsors the payment transaction gas on both networks. The service price is the same on either network; wallet funding or exchange fees are separate.

Request binding

The server authenticates the complete quote and input and atomically binds the first accepted authorization to them. Standard Base EIP-3009 signs the money terms and nonce, not HTTP content. Keep signatures private; do not reuse an authorization for another quote, operation or body.

Refund policy

All requested completions must be usable and stored before settlement. Any supplier error, refusal or truncation is uncharged. Recover with the original proof.

Authorization window

Payment offers use a 120-second maximum timeout. Solana blockhash validity is independently checked and can expire earlier.

Recovery

Private results are accessible for 30 days. Never sign a replacement for an uncertain payment.