import { http } from "@/shared/api/httpClient";
import { API_ROUTES } from "@/shared/constants/api-routes";

import {
  GenerationResponse,
  GenerationResponseSchema,
  StartGenerationRequest,
} from "./types";

export const startGeneration = async (payload: StartGenerationRequest) => {
  return http.post<GenerationResponse>(API_ROUTES.startGeneration(), payload, {
    tags: ["generations"],
    schema: GenerationResponseSchema,
    revalidate: 0,
  });
};
