openapi: 3.0.3
info:
  title: Evalyard API (minimal example)
  version: "0.1.0"
  description: |
    Minimal schema to help LLMs and tools understand Evalyard routing.
    Replace the server URL with your instance.
servers:
  - url: https://api.your-evalyard.example.com
paths:
  /api/v1/infer:
    post:
      summary: Run inference routed to the best healthy device for a given tag
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [prompt, device_tag]
              properties:
                prompt:
                  type: string
                  example: "Summarize this message..."
                device_tag:
                  type: string
                  example: "fastest"
                max_tokens:
                  type: integer
                  example: 128
      responses:
        "200":
          description: Inference OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  output: { type: string, example: "Short summary..." }
                  metrics:
                    type: object
                    properties:
                      ttft_ms: { type: number, example: 180.5 }
                      tokens_per_sec: { type: number, example: 24.3 }
                      p95_ms: { type: number, example: 320.0 }
        "4XX":
          description: Client error
        "5XX":
          description: Server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
