export type CreateApiBytemineV1IcpBuilderArgs = {body: {description: string, count?: number | undefined, webhook_url?: string | undefined}}; export type CreateApiBytemineV1IcpBuilderOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Describe your ideal customer profile in plain text. Returns a job_id immediately. Provide a webhook_url to receive results when complete (required, as job polling is not available through this API). 50 credits per run. * * POST /bytemine/v1/icp-builder */ export const createApiBytemineV1IcpBuilder = async (args: CreateApiBytemineV1IcpBuilderArgs, options?: CreateApiBytemineV1IcpBuilderOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/bytemine/v1/icp-builder${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };