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: Voxara API — music-driven language & pronunciation tutor servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: tracks description: Track search and lyric/translation/timing resolution 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" /tracks/featured: get: operationId: getFeaturedTracks tags: [tracks] summary: Featured demo-ready tracks description: A small curated shortlist of tracks confirmed to have full lyrics, richsync and translation coverage. parameters: - name: selected_language in: query required: false schema: type: string default: en description: Target language code used to indicate translation availability. responses: "200": description: Featured tracks content: application/json: schema: type: array items: $ref: "#/components/schemas/Track" /tracks/search: get: operationId: searchTracks tags: [tracks] summary: Search for a track description: Resolve tracks by title and/or artist via Musixmatch. parameters: - name: q_track in: query required: false schema: type: string description: Track title. - name: q_artist in: query required: false schema: type: string description: Artist name. - name: q in: query required: false schema: type: string description: Free-text query (artist and title combined). responses: "200": description: Matching tracks content: application/json: schema: type: array items: $ref: "#/components/schemas/Track" "400": description: Missing query content: application/json: schema: $ref: "#/components/schemas/ApiError" /tracks/identify: get: operationId: identifyTrack tags: [tracks] summary: Identify a track from a remembered lyric description: > "I remember a lyric" search — resolves candidate tracks from a snippet of remembered lyrics via Musixmatch full-text lyric search. parameters: - name: lyric in: query required: true schema: type: string description: A snippet of lyrics the learner remembers. responses: "200": description: Matching tracks (best matches first) content: application/json: schema: type: array items: $ref: "#/components/schemas/Track" "400": description: Lyric snippet too short or missing content: application/json: schema: $ref: "#/components/schemas/ApiError" /tracks/discover: get: operationId: discoverByMood tags: [tracks] summary: Discover tracks by mood description: > Lyric-powered recommendations — each mood maps to evocative lyric keywords searched via Musixmatch full-text lyric search. parameters: - name: mood in: query required: true schema: type: string enum: [heartbreak, hype, nostalgic, romantic, hopeful, chill] description: The mood to discover tracks for. responses: "200": description: Tracks matching the mood content: application/json: schema: type: array items: $ref: "#/components/schemas/Track" "400": description: Unknown or missing mood content: application/json: schema: $ref: "#/components/schemas/ApiError" /tracks/breakout: get: operationId: getBreakoutTracks tags: [tracks] summary: Breakout tracks (charts re-ranked by Songstats velocity) description: > Musixmatch chart entries re-ranked by a Songstats growth/velocity signal (live chart presence + fresh editorial-playlist share) rather than raw chart position. Each entry carries its velocity score. responses: "200": description: Chart tracks re-ranked by velocity (highest first) content: application/json: schema: type: array items: $ref: "#/components/schemas/BreakoutTrack" /tracks/trending: get: operationId: getTrendingTracks tags: [tracks] summary: Trending tracks to learn description: Currently popular tracks (Musixmatch top chart) suitable as learning material. parameters: - name: selected_language in: query required: false schema: type: string default: en description: Target language code used to indicate translation availability. responses: "200": description: Trending tracks content: application/json: schema: type: array items: $ref: "#/components/schemas/Track" /tracks/stats: get: operationId: getTrackStats tags: [tracks] summary: Cross-platform popularity stats for a track description: > Resolves real-world streaming, Shazam, playlist and TikTok stats for a track via Songstats, matched by title and artist. Powers the popularity badges on track cards. parameters: - name: trackName in: query required: true schema: type: string description: Track title. - name: artistName in: query required: true schema: type: string description: Artist name. responses: "200": description: Popularity stats (fields are null when unavailable) content: application/json: schema: $ref: "#/components/schemas/TrackStats" /tracks/session: get: operationId: getTrackSession tags: [tracks] summary: Resolve lyrics, word timings and translation for a track description: > Fetches the canonical lyrics, the richsync word-level timings and a target-language translation in a single call. Powers Listen mode (minus the isolated audio, which is produced separately via the isolation endpoints). parameters: - name: trackId in: query required: true schema: type: integer description: Musixmatch track_id. - name: selected_language in: query required: false schema: type: string default: en description: Target language code for translation (e.g. "en"). responses: "200": description: Track session payload content: application/json: schema: $ref: "#/components/schemas/TrackSession" "404": description: Track not found or missing required assets content: application/json: schema: $ref: "#/components/schemas/ApiError" components: schemas: HealthStatus: type: object properties: status: type: string required: - status ApiError: type: object required: [error] properties: error: type: string Track: type: object required: - trackId - commontrackId - trackName - artistName - hasLyrics - hasRichsync - hasSubtitles - hasTranslation properties: trackId: type: integer commontrackId: type: integer trackName: type: string artistName: type: string albumName: type: ["string", "null"] albumCoverUrl: type: ["string", "null"] hasLyrics: type: boolean hasRichsync: type: boolean description: Whether word-level timing is available (best experience). hasSubtitles: type: boolean description: > Whether line-level subtitle timing is available. Used to predict the "line practice" tier before a session is resolved. hasTranslation: type: boolean BreakoutTrack: type: object required: - trackId - commontrackId - trackName - artistName - hasLyrics - hasRichsync - hasSubtitles - hasTranslation - velocityScore properties: trackId: type: integer commontrackId: type: integer trackName: type: string artistName: type: string albumName: type: ["string", "null"] albumCoverUrl: type: ["string", "null"] hasLyrics: type: boolean hasRichsync: type: boolean hasSubtitles: type: boolean hasTranslation: type: boolean velocityScore: type: number description: Songstats-derived breakout/velocity score (higher = more momentum). TrackStats: type: object required: [found] properties: found: type: boolean description: Whether a matching track was found on Songstats. spotifyStreams: type: ["number", "null"] description: Total Spotify streams. spotifyPopularity: type: ["integer", "null"] description: Spotify popularity index (0-100). playlists: type: ["integer", "null"] description: Current Spotify playlist placements. shazams: type: ["number", "null"] description: Total Shazams. tiktokViews: type: ["number", "null"] description: Total TikTok video views using the track. songstatsUrl: type: ["string", "null"] description: Link to the track's Songstats profile. LyricWord: type: object required: [text, start, end] properties: text: type: string start: type: number description: Word start time in seconds. end: type: number description: Word end time in seconds. LyricLine: type: object required: [index, ts, te, text, words] properties: index: type: integer ts: type: number description: Line start time in seconds. te: type: number description: Line end time in seconds. text: type: string description: The full original line text. words: type: array items: $ref: "#/components/schemas/LyricWord" translation: type: ["string", "null"] description: Translated text for this line, if available. TrackSession: type: object required: - track - lines - copyright - hasRichsync - hasTranslation - syncLevel - targetLanguage properties: track: $ref: "#/components/schemas/Track" lines: type: array items: $ref: "#/components/schemas/LyricLine" plainLyrics: type: ["string", "null"] description: Plain-text lyrics fallback when richsync is unavailable. copyright: type: string description: Mandatory Musixmatch copyright notice to render alongside lyrics. hasRichsync: type: boolean description: Whether word-level timing is available (syncLevel == "word"). hasTranslation: type: boolean syncLevel: type: string enum: [word, line, none] description: > Timing granularity available for this track — "word" (per-word richsync), "line" (line-level subtitles), or "none" (plain lyrics only, Practice unavailable). targetLanguage: type: string GradedWord: type: object required: [expected, status] properties: expected: type: string status: type: string enum: [match, substituted, missing] actual: type: ["string", "null"] description: What the learner actually said for this position, if any. GradingResult: type: object required: [scorePercent, transcript, words, extraWords] properties: scorePercent: type: integer description: Matched words / total expected words, as a percentage. transcript: type: string description: Full transcription of the learner's attempt. words: type: array items: $ref: "#/components/schemas/GradedWord" extraWords: type: array items: type: string description: Words the learner added that were not expected.