Mireye Ask API

The Ask API from Mireye — 2 operation(s) for ask.

OpenAPI Specification

mireye-ask-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Mireye Earth Ask API
  description: Provenance-tagged geospatial data for US coordinates. POST /v1/fetch for deterministic field values; POST /v1/ask for natural-language Q&A; GET /v1/meta/fields for the catalog.
  version: 0.14.0
tags:
- name: Ask
paths:
  /v1/ask:
    post:
      summary: Natural-language Q&A over a US coordinate (LLM-backed)
      description: 'Plans which catalog fields to fetch, fetches them, and synthesizes a cited answer. Much slower than `/v1/fetch`: typically ~6-20 s, hard-bounded at 110 s (then a `504 ask_timeout`). **Set a client timeout of at least 120 s.** For progressive output (first tokens ~5-7 s) use `POST /v1/ask/stream`. Returns `429 ask_busy` when the fleet-wide concurrency cap is saturated; retryable failures carry a `Retry-After` header.'
      operationId: ask_v1_ask_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Ask
  /v1/ask/stream:
    post:
      summary: Streaming (SSE) natural-language Q&A over a US coordinate
      description: Server-Sent Events variant of `/v1/ask`, same request body. Emits `delta` frames as the answer is synthesized (first tokens ~5-7 s), then one terminal `final` frame carrying the full `/v1/ask` body, or an `error` frame on mid-stream failure. Same 110 s deadline and `429 ask_busy` back-pressure as the buffered route; failures before the first byte surface as a real HTTP status (with `Retry-After` when retryable). Set a client timeout of at least 120 s.
      operationId: ask_stream_v1_ask_stream_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Ask
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AskRequest:
      properties:
        lat:
          type: number
          title: Lat
        lng:
          type: number
          title: Lng
        question:
          type: string
          maxLength: 2000
          minLength: 1
          title: Question
        include_trace:
          type: boolean
          title: Include Trace
          default: false
      type: object
      required:
      - lat
      - lng
      - question
      title: AskRequest