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

# Quote a session before spending — free, always callable

> No charge, no balance required; works on fn_test_ keys and zero-balance accounts (https://docs.fiveninelabs.com/guides/test-mode). Rate-limited in the spending-POST bucket.




## OpenAPI

````yaml /api-reference/openapi.yaml post /sessions/estimate
openapi: 3.1.0
info:
  title: Five Nine Agent API
  version: '2026-08-26'
  description: >
    Live catalogs from the open web, under signed receipts.

    Conventions (versioning via the dated `fn-version` header, request IDs,

    idempotency, rate limits, pagination, money) are documented across this

    reference; the error envelope at https://docs.fiveninelabs.com/errors; the

    event vocabulary at https://docs.fiveninelabs.com/guides/events; webhooks at

    https://docs.fiveninelabs.com/guides/webhooks.


    Honesty marker: operations tagged `x-fn-status: planned` are specced but NOT

    yet served by the live API — on any method they answer 501 not_implemented
    with

    a `surface` member naming what is missing, never 404. Everything unmarked is

    live. The changelog says when a planned surface ships.
servers:
  - url: https://api.fiveninelabs.com/v1
security:
  - bearerKey: []
paths:
  /sessions/estimate:
    post:
      summary: Quote a session before spending — free, always callable
      description: >
        No charge, no balance required; works on fn_test_ keys and zero-balance
        accounts (https://docs.fiveninelabs.com/guides/test-mode). Rate-limited
        in the spending-POST bucket.
      parameters:
        - $ref: '#/components/parameters/FnVersion'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
      responses:
        '200':
          description: >-
            The quote — parsed intent, planned fan-out, estimated cost,
            would-we-run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Estimate'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimit'
        '502':
          $ref: '#/components/responses/EngineUnavailable'
components:
  parameters:
    FnVersion:
      name: fn-version
      in: header
      required: false
      schema:
        type: string
        example: '2026-08-26'
      description: >-
        Dated API version; defaults to the account pin. Honesty note: with one
        version in existence the gateway echoes any value back as effective
        WITHOUT validating it — validation against the known-versions set is
        planned, so send only real dated versions from
        https://docs.fiveninelabs.com/changelog
  schemas:
    Estimate:
      type: object
      required:
        - would_run
      properties:
        would_run:
          type: boolean
          description: false = we would decline to spend, stated
        parsed:
          type: object
          properties:
            entity:
              type: string
            geo:
              type: string
              description: >-
                flattened prose form; the typed geo object rides the additive
                `intent` member
            confidence:
              type: string
              description: >-
                string-wrapped float 0–1 today, e.g. "0.92" — a documented
                divergence: events carry confidence as a NUMBER 0–1, which is
                the canonical form; this field becoming a number is a planned
                dated-version change (see the events guide)
        planned_merchants:
          type: array
          items:
            type: string
          description: >-
            the domains that would be dispatched — the list, not a count, so the
            caller sees the aim before spending (decided 2026-08-26)
        planned_dispatches:
          type: integer
        estimated_usd_low:
          type: number
        estimated_usd_high:
          type: number
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - doc_url
            - request_id
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            doc_url:
              type: string
              format: uri
            request_id:
              type: string
          additionalProperties: true
  responses:
    Unauthorized:
      description: 401 invalid_key | key_revoked — key missing, unknown, or revoked
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        403 missing_scope — or a cap forbids this (session_cap_exceeded |
        monthly_cap_exceeded; caps are permissions, not rates)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimit:
      description: 429 rate_limited | concurrency_cap, with Retry-After
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    EngineUnavailable:
      description: >-
        502 engine_unavailable — the extraction engine is unreachable; nothing
        was billed and no run started. No Retry-After header today; retry with
        your own backoff
        (https://docs.fiveninelabs.com/errors/engine_unavailable)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerKey:
      type: http
      scheme: bearer
      description: 'fn_live_… or fn_test_… — Authorization: Bearer'

````