import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Inference extends APIResource { /** * Runs a model using a free-form, vendor-native request payload rather than a * fixed OpenAI schema. * * Use this endpoint when the target model does not fit the OpenAI chat, responses, * or text-completion contracts: the `args` field is an arbitrary dict passed * straight through to the selected vendor gateway, and the reply is returned * inside `response` as arbitrary JSON (object, array, string, number, or boolean). * Prefer /v5/chat/completions, /v5/responses, or /v5/completions when your request * matches one of those OpenAI-standard shapes, since those return typed OpenAI * response objects. The model is chosen from the `model` field formatted as * `vendor/name`, which selects the per-vendor inference gateway. When the request * enables streaming, the response is sent as server-sent events with each chunk * wrapped as a `generic_inference.chunk` object; otherwise a single * `generic_inference` object is returned. */ create(body: InferenceCreateParams, options?: RequestOptions): APIPromise; } export interface InferenceResponse { response: { [key: string]: unknown; } | Array | string | number | boolean | null; object?: 'generic_inference'; } export interface InferenceResponseChunk { response: { [key: string]: unknown; } | Array | string | number | boolean | null; object?: 'generic_inference.chunk'; } export interface LaunchInferenceConfiguration { num_retries?: number; timeout_seconds?: number; } export type InferenceCreateResponse = InferenceResponse | InferenceResponseChunk; export interface InferenceCreateParams { /** * model specified as `vendor/name` (ex. openai/gpt-5) */ model: string; /** * Arguments passed into model */ args?: { [key: string]: unknown; }; /** * Vendor specific configuration */ inference_configuration?: LaunchInferenceConfiguration; } export declare namespace Inference { export { type InferenceResponse as InferenceResponse, type InferenceResponseChunk as InferenceResponseChunk, type LaunchInferenceConfiguration as LaunchInferenceConfiguration, type InferenceCreateResponse as InferenceCreateResponse, type InferenceCreateParams as InferenceCreateParams, }; } //# sourceMappingURL=inference.d.ts.map