openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: API specification servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: media description: YouTube media operations paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /media: get: operationId: downloadMedia tags: [media] summary: Download YouTube media description: Streams audio from a YouTube URL through the media cache service. parameters: - name: url in: query required: true schema: type: string - name: type in: query required: true schema: type: string enum: [audio] - name: quality in: query required: true schema: type: string default: "360" responses: "200": description: Streamed audio file content: audio/mpeg: schema: type: string format: binary "400": description: Invalid request content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "502": description: Upstream download failure content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" components: schemas: HealthStatus: type: object properties: status: type: string required: - status ErrorResponse: type: object properties: error: type: string required: - error