> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywithlocus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview the saved multi-provider web-search plan

> Enterprise-only free preview; requires tenant:read.



## OpenAPI

````yaml /api-reference/openapi.json post /credits/router/preview
openapi: 3.1.0
info:
  title: Locus Pro API
  description: >-
    Access paid tools, manage prepaid balances, and build usage billing. Send
    money as exact decimal strings and reuse Idempotency-Key on retries.
    Management routes require a scoped server key or authorized dashboard
    session. Sensitive workspace changes require an owner or admin with recent
    MFA or passkey verification, except where an operation documents a stricter
    boundary. Interactive agents use MCP OAuth; unattended agents use scoped
    Agent Connections. Browser widgets use end-user tokens.
  version: 0.7.0
servers:
  - url: https://api.paywithlocus.com/api
    description: Production
  - url: https://api.stage.paywithlocus.com/api
    description: Stage — evaluation and integration testing
security:
  - secretKey: []
tags:
  - name: Authentication
    description: Email-verified self-serve account creation and dashboard identity
  - name: Tenants
    description: Tenant profile, keys, and settings (dashboard session or secret key)
  - name: Workspace members
    description: Invite-only human workspace membership and role administration
  - name: Catalog
    description: Enable/disable APIs and set markups
  - name: Custom APIs
    description: Feature-gated enterprise BYOK providers and schema-backed custom actions
  - name: End users
    description: End-user accounts, tokens, and allocations
  - name: Top-ups
    description: Locus-hosted checkout top-ups and quotes
  - name: Ledger
    description: Burn/top-up history and earnings
  - name: Webhooks
    description: Signed events, delivery inspection, and replay
  - name: Burn
    description: Metered pay-per-use calls
  - name: MCP
    description: Stateless Streamable HTTP transport and MCP tool-result contracts
  - name: Okibi Identity
    description: >-
      Feature-gated Okibi identity verification and scoped native CLI credential
      bootstrap
  - name: Widget
    description: End-user JWT surface; a matching publishable key is optional
  - name: Agent-native onboarding
    description: >-
      Self-registration, human Stripe funding handoff, and restricted account
      setup for headless agents
  - name: Hosted Workflows
    description: >-
      Tenant-private TypeScript Workflow definitions, immutable versions,
      bounded runs, artifacts, and recovery
  - name: Agent connections
    description: Scoped, expiring, revocable credentials for agent execution
  - name: Recipes
    description: >-
      Search, research, extraction, enrichment, and travel outcomes across
      providers
paths:
  /credits/router/preview:
    post:
      tags:
        - Recipes
      summary: Preview the saved multi-provider web-search plan
      description: Enterprise-only free preview; requires tenant:read.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LocusWebSearchRequest'
      responses:
        '200':
          description: Free routing plan and current estimate
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '403':
          description: Enterprise tier and tenant:read scope required
      security:
        - dashboardSession: []
        - secretKey: []
components:
  schemas:
    LocusWebSearchRequest:
      type: object
      properties:
        query:
          type: string
          pattern: ^\s*(?:\S|\S[\s\S]{0,398}\S)\s*$
          description: Search or research request.
        maxResults:
          type: integer
          minimum: 1
          maximum: 20
          default: 10
        mode:
          type: string
          enum:
            - fast
            - balanced
            - comprehensive
          default: balanced
        maxProviders:
          type: integer
          minimum: 1
          maximum: 13
          default: 4
        strategy:
          type: string
          enum:
            - balanced
            - cost
            - quality
            - speed
          description: Legacy mode selector retained for compatible clients.
        topic:
          type: string
          enum:
            - general
            - news
          default: general
        recencyDays:
          type: integer
          minimum: 1
          maximum: 365
        country:
          type: string
          pattern: ^[A-Za-z]{2}$
        includeDomains:
          type: array
          maxItems: 20
          items:
            type: string
            minLength: 1
            pattern: \S
        excludeDomains:
          type: array
          maxItems: 20
          items:
            type: string
            minLength: 1
            pattern: \S
        includeImages:
          type: boolean
          default: false
        providers:
          type: array
          maxItems: 13
          items:
            type: string
            pattern: >-
              ^\s*(?:[aA][gG][eE][nN][tT]402|[aA][gG][eE][nN][tT][sS][tT][oO][oO][lL][sS]|[aA][nN][dD][iI]|[bB][rR][aA][vV][eE]|[dD][aA][tT][aA][fF][oO][rR][sS][eE][oO]|[eE][xX][aA]|[fF][iI][rR][eE][cC][rR][aA][wW][lL]|[lL][iI][nN][kK][uU][pP]|[pP][aA][rR][aA][lL][lL][eE][lL]|[pP][eE][rR][pP][lL][eE][xX][iI][tT][yY]|[sS][eE][lL][tT][zZ]|[sS][eE][rR][pP][eE][rR]|[tT][aA][vV][iI][lL][yY])\s*$
            description: >-
              Provider ID. Available values: agent402, agentstools, andi, brave,
              dataforseo, exa, firecrawl, linkup, parallel, perplexity, seltz,
              serper, tavily. Matching ignores case and surrounding whitespace.
        maxCredits:
          oneOf:
            - type: string
              pattern: >-
                ^\s*(?=[0-9.]{1,100}\s*$)0*(?:(?:[1-9]\d{0,11})(?:\.\d{1,6})?|1000000000000(?:\.0{1,6})?|0\.(?=\d{0,5}[1-9])\d{1,6})\s*$
            - type: number
              exclusiveMinimum: 0
              maximum: 1000000000000
          description: >-
            Aggregate hard charge ceiling in workspace credits. Decimal strings
            support up to six fractional digits; numeric values are rounded down
            to six digits.
        rails:
          type: array
          items:
            type: string
            enum:
              - api-key
              - mpp
              - x402
          description: Legacy access-path field retained for compatible clients.
        externalUserId:
          type: string
          minLength: 1
          pattern: \S
          description: Optional end-user billing attribution for a tenant secret key.
        attribution:
          type: object
          additionalProperties: true
          description: Optional JSON ledger metadata such as a task or customer identifier.
      required:
        - query
      additionalProperties: false
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: Tenant secret key (lcr_…). Server-side only.
    dashboardSession:
      type: http
      scheme: bearer
      description: >-
        Locus Pro dashboard session (Cognito). High-risk workspace
        administration requires an owner or admin role and fresh MFA/passkey
        step-up.

````