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

# AskDataQuestionAPI mirrors the erdo_ask_data_question MCP tool as a REST
endpoint.




## OpenAPI

````yaml /api/openapi.json post /v1/ask
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, and experiments. Authenticate with
    a Bearer API key (erdo_api_...) or scoped token (erdo_token_...).
  version: '2026-07-25'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/ask:
    post:
      summary: |
        AskDataQuestionAPI mirrors the erdo_ask_data_question MCP tool as a REST
        endpoint.
      operationId: POST:mcp.AskDataQuestionAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                async:
                  description: >
                    answer — use it for long operations (e.g. building a landing
                    page) that would otherwise exceed the HTTP/edge timeout.
                    Poll erdo\_list\_agent\_runs / GET
                    /v1/runs?thread\_id=\<thread\_id> until the run is
                    completed, then read its output.
                  title: >
                    Async returns as soon as the run is kicked off instead of
                    waiting for the
                  type: boolean
                dataset_slugs:
                  items:
                    type: string
                  type: array
                images:
                  items:
                    $ref: '#/components/schemas/mcp.MCPImageRef'
                  type: array
                question:
                  type: string
                timezone:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  answer:
                    type: string
                  message:
                    type: string
                  status:
                    type: string
                  thread_id:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.MCPImageRef:
      properties:
        bucket_key:
          type: string
        height:
          format: int64
          type: integer
        media_type:
          type: string
        width:
          format: int64
          type: integer
      title: >
        MCPImageRef is a reference to an image already uploaded via
        erdo_upload_image.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````