openapi: 3.1.0
info:
  title: BuyCast.ai Marketing Agent API
  version: 1.0.0
  description: Read-only public API for BuyCast.ai marketing content, pricing, comparisons, FAQs, posts, and changelog entries.
servers:
  - url: https://buycast.ai
paths:
  /api/agent:
    get:
      operationId: getAgentManifest
      summary: Get agent manifest
      responses:
        "200":
          description: Agent operation manifest.
    post:
      operationId: callMarketingAgent
      summary: Call a read-only marketing-content operation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AgentRequest"
            examples:
              search:
                value:
                  op: search
                  args:
                    query: buy box
                    limit: 5
      responses:
        "200":
          description: Operation result with source URLs.
          content:
            application/json:
              schema:
                type: object
        "400":
          description: Invalid or unsupported operation.
components:
  schemas:
    AgentRequest:
      type: object
      additionalProperties: true
      properties:
        op:
          type: string
          enum:
            - search
            - listFeatures
            - getFeature
            - listPlans
            - getPlan
            - listComparisons
            - getComparison
            - listPosts
            - getPost
            - getFaqs
            - tools/list
            - tools/call
        args:
          type: object
          additionalProperties: true
        id:
          oneOf:
            - type: string
            - type: number
            - type: "null"
