import { api } from "@/lib/api-client";

export const mediaService = {
  async generateListeningAudio(data: { text: string; voice_id?: string }): Promise<{ audio_url: string }> {
    return api.post("/exam/listening/media", data);
  },

  async generateSpeakingVideo(data: { text: string; avatar_id?: number }): Promise<{ video_url: string; job_id: string }> {
    return api.post("/exam/speaking/media", data);
  },

  async getAvatars(): Promise<{ id: number; name: string; thumbnail: string; voice: string }[]> {
    return api.get("/exam/avatars");
  },
};
