Q AI — Partner Integration

Q AI can be integrated into wallets, DEX frontends, DeFi dashboards, trading bots, and research platforms. This guide covers integration options, partner tiers, and use cases.

Partner Tiers

FeatureFreeProEnterprise
Rate Limit100 req/day10,000 req/dayUnlimited
Chat APIyesyesyes
Streamingyesyes
Read-only toolsyesyesyes
Mutating toolsyesyes
Forensicsyesyes
Webhooksyesyes
Custom agentsyes
Dedicated instanceyes
SLA99.9%
SSO / SAMLyes
SupportCommunityEmailDedicated
PricingFree$99/moCustom

Integration Options

1. REST API

Direct HTTP integration. Best for backends and serverless functions.

const response = await fetch("https://api.yoorquezt.io/api/v1/chat", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer pk_partner_xxx",
    "X-MEV-Role": "analyst",
  },
  body: JSON.stringify({
    message: "What MEV risk does this wallet have?",
    context: { wallet: "0x1234..." },
  }),
});

const data = await response.json();
console.log(data.content);

2. React Widget (QMEVFloating)

Drop-in floating chat widget for web applications.

npm install @yoorquezt/react-mev
import { QMEVFloating } from "@yoorquezt/react-mev";

function App() {
  return (
    <div>
      <YourApp />
      <QMEVFloating
        apiKey="pk_partner_xxx"
        role="analyst"
        position="bottom-right"
        theme="dark"
        placeholder="Ask Q about MEV..."
        context={{ chain: "ethereum" }}
      />
    </div>
  );
}

Widget features:

  • Floating button that expands into a chat panel
  • Streaming responses with markdown rendering
  • Tool-use visibility (shows which tools Q is using)
  • Confirmation dialogs for mutating actions
  • Customizable theme, position, and branding
  • Mobile responsive

3. TypeScript SDK

Full programmatic access. See MEV SDK -- TypeScript.

import { QMEVClient, MEVGatewayClient } from "@yoorquezt/sdk-mev";

const ai = new QMEVClient({
  baseUrl: "https://api.yoorquezt.io",
  apiKey: "pk_partner_xxx",
  role: "analyst",
});

const response = await ai.chat("Analyze MEV on Uniswap V3 WETH/USDC pool");
console.log(response.content);

4. Python SDK

Async Python integration. See MEV SDK -- Python.

from yoorquezt_sdk_mev import QMEVClient

client = QMEVClient(
    base_url="https://api.yoorquezt.io",
    api_key="pk_partner_xxx",
    role="analyst",
)

response = await client.chat("Show me sandwich attacks on this pool")
print(response.content)

Use Cases

Partner TypeUse CaseIntegrationRole
WalletMEV protection status, rebate trackingReact Widget, REST APIviewer
DEX FrontendSwap MEV risk analysis, route optimizationReact Widget, TypeScript SDKanalyst
DeFi DashboardPortfolio MEV exposure, forensic reportsREST API, Python SDKanalyst
Trading BotBundle submission, strategy analyticsTypeScript SDK, Gateway WSsearcher
Block ExplorerBlock MEV breakdown, bundle visualizationREST APIanalyst
Research PlatformMEV trend analysis, competitive intelligencePython SDK, REST APIanalyst

Webhook Events

Pro and Enterprise partners can receive webhook notifications for MEV events.

Configuration

curl -X POST https://api.yoorquezt.io/api/v1/webhooks \
  -H "Authorization: Bearer pk_partner_xxx" \
  -d '{
    "url": "https://your-app.com/webhooks/mev",
    "events": ["bundle.landed", "bundle.failed", "protection.rebate", "auction.settled"],
    "secret": "whsec_xxx"
  }'

Event Types

EventDescription
bundle.submittedA bundle was submitted
bundle.simulatedA bundle simulation completed
bundle.landedA bundle was included in a block
bundle.failedA bundle failed to land
protection.interceptedA transaction was intercepted for MEV protection
protection.rebateA rebate was distributed to a protected user
auction.startedA new auction round started
auction.settledAn auction was settled
intent.matchedAn intent was matched with a solver
intent.fulfilledAn intent was fulfilled

Payload Format

{
  "id": "evt_abc123",
  "type": "bundle.landed",
  "timestamp": "2026-03-15T14:30:00Z",
  "data": {
    "bundle_hash": "0x9f8e7d...",
    "block": 19482301,
    "profit": "0.0312",
    "chain": "ethereum"
  }
}

Signature Verification

Webhooks are signed with HMAC-SHA256. Verify the X-YQ-Signature header:

import crypto from "crypto";

function verifyWebhook(payload: string, signature: string, secret: string): boolean {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(payload)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

Getting Started

  1. Sign up at yoorquezt.io/partners and get your API key.
  2. Choose an integration -- REST API for quick prototyping, React Widget for instant UI, SDK for full control.
  3. Select your role -- viewer for read-only, analyst for analytics, searcher for bundle operations.
  4. Test locally -- run the Q AI stack with Docker and test against http://localhost:9100.
  5. Go live -- switch the base URL to https://api.yoorquezt.io and use your production API key.
# Quick test
curl -H "Authorization: Bearer pk_partner_xxx" \
     -H "X-MEV-Role: analyst" \
     -H "Content-Type: application/json" \
     -d '{"message": "Platform health summary"}' \
     https://api.yoorquezt.io/api/v1/chat
Edit this page