export type DeleteApiCodexCostPerCreditCodexCostPerCreditIdArgs = {codex_cost_per_credit_id: unknown}; export type DeleteApiCodexCostPerCreditCodexCostPerCreditIdOptions = {baseUrl?: string | undefined, APIKeyHeader?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Codex Cost Per Credit * * DELETE /codex-cost-per-credit/{codex_cost_per_credit_id} * * Also accepts auth: ClassicAPIKeyHeader, OAuth2PasswordBearer, HTTPBasic */ export const deleteApiCodexCostPerCreditCodexCostPerCreditId = async (args: DeleteApiCodexCostPerCreditCodexCostPerCreditIdArgs, options?: DeleteApiCodexCostPerCreditCodexCostPerCreditIdOptions) => { const {baseUrl = "https://api.galileo.ai", fetch: fetchFn = fetch, APIKeyHeader} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (APIKeyHeader !== undefined) headers.set("Splunk-AO-API-Key", APIKeyHeader) const url = `${baseUrl.replace(/\/+$/, '')}/codex-cost-per-credit/${encodeURIComponent(String(args.codex_cost_per_credit_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };