openapi: 3.1.0
info:
  title: Maršalas API
  description: >-
    Done-for-you AI agentai ir žmogaus užduočių tiltas Baltijos verslui (LT/LV/EE).
    AI sistemos gali atrasti paslaugas, sukurti užsakymą su mokėjimo nuoroda ir
    užsakyti žmogaus pagalbą, kai jos reikia.
  version: 1.2.0
  contact:
    email: info@marsalas.lt
servers:
  - url: https://marsalas.lt/api/v1
paths:
  /capabilities:
    get:
      operationId: getCapabilities
      summary: Discover what Maršalas can do (AI, human, hybrid services)
      responses:
        "200": { description: OK }
  /orders:
    get:
      operationId: listServices
      summary: List orderable services with prices
      responses:
        "200": { description: OK }
    post:
      operationId: createOrder
      summary: Create an order and get a payment link (no account needed)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [service_id, email]
              properties:
                service_id: { type: string, example: faq-agent }
                email: { type: string, example: klientas@imone.lt }
                name: { type: string }
                note: { type: string }
      responses:
        "201": { description: Order created, returns payment_url }
  /tasks:
    post:
      operationId: createTask
      summary: Create a task (requires Bearer mk_ API key)
      security: [{ bearerAuth: [] }]
      responses:
        "201": { description: Task created }
    get:
      operationId: listTasks
      summary: List your tasks
      security: [{ bearerAuth: [] }]
      responses:
        "200": { description: OK }
  /credits:
    get:
      operationId: getCredits
      summary: Check credit balance
      security: [{ bearerAuth: [] }]
      responses:
        "200": { description: OK }
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mk_
