@basetenlabs/client - v0.2.0
    Preparing search index...

    Type Alias components

    This file was auto-generated by openapi-typescript. Do not make direct changes to the file.

    type components = {
        headers: { "X-BASETEN-REQUEST-ID": string };
        parameters: { deployment_id: string; env_name: string; request_id: string };
        pathItems: never;
        requestBodies: {
            AsyncPredictInput: {
                content: {
                    "application/json": components["schemas"]["AsyncPredictRequest"];
                };
            };
            AsyncRunRemoteInput: {
                content: {
                    "application/json": components["schemas"]["AsyncRunRemoteInput"];
                };
            };
            PredictInput: {
                content: {
                    "application/json": components["schemas"]["PredictInput"];
                    "application/octet-stream": string;
                    "multipart/form-data": Record<string, unknown>;
                };
            };
            RunRemoteInput: {
                content: {
                    "application/json": components["schemas"]["RunRemoteInput"];
                };
            };
        };
        responses: {
            AsyncPredictOutput: {
                content: {
                    "application/json": components["schemas"]["AsyncPredictOutput"];
                };
                headers: { [name: string]: unknown };
            };
            AsyncRunRemoteOutput: {
                content: {
                    "application/json": components["schemas"]["AsyncRunRemoteOutput"];
                };
                headers: { [name: string]: unknown };
            };
            CancelAsyncRequestOutput: {
                content: {
                    "application/json": components["schemas"]["CancelAsyncRequestOutput"];
                };
                headers: { [name: string]: unknown };
            };
            Error: {
                content: {
                    "application/json": components["schemas"]["ErrorResponse"];
                };
                headers: { [name: string]: unknown };
            };
            GetAsyncQueueStatusOutput: {
                content: {
                    "application/json": components["schemas"]["GetAsyncQueueStatusOutput"];
                };
                headers: { [name: string]: unknown };
            };
            GetAsyncRequestStatusOutput: {
                content: {
                    "application/json": components["schemas"]["AsyncRequestStatusResponse"];
                };
                headers: { [name: string]: unknown };
            };
            PredictOutput: {
                content: {
                    "application/json": components["schemas"]["PredictOutput"];
                    "application/octet-stream": string;
                };
                headers: {
                    "X-BASETEN-REQUEST-ID": components["headers"]["X-BASETEN-REQUEST-ID"];
                    [name: string]: unknown;
                };
            };
            RunRemoteOutput: {
                content: {
                    "application/json": components["schemas"]["RunRemoteOutput"];
                };
                headers: {
                    "X-BASETEN-REQUEST-ID": components["headers"]["X-BASETEN-REQUEST-ID"];
                    [name: string]: unknown;
                };
            };
        };
        schemas: {
            AsyncPredictOutput: { request_id: string };
            AsyncPredictRequest: {
                inference_retry_config?: components["schemas"]["InferenceRetryConfig"];
                max_time_in_queue_seconds?: number;
                model_input: Record<string, unknown>;
                priority?: number;
                webhook_endpoint?: string;
            };
            AsyncRequestError: {
                code: | "MODEL_PREDICT_ERROR"
                | "MODEL_PREDICT_TIMEOUT"
                | "MODEL_NOT_READY"
                | "MODEL_DOES_NOT_EXIST"
                | "MODEL_UNAVAILABLE"
                | "MODEL_INVALID_INPUT"
                | "ASYNC_REQUEST_NOT_SUPPORTED"
                | "INTERNAL_SERVER_ERROR";
                message: string;
            };
            AsyncRequestStatusResponse: {
                chain_id?: string;
                created_at: string;
                deployment_id: string;
                errors: components["schemas"]["AsyncRequestError"][];
                model_id?: string;
                request_id: string;
                status: | "QUEUED"
                | "IN_PROGRESS"
                | "SUCCEEDED"
                | "FAILED"
                | "EXPIRED"
                | "CANCELED"
                | "WEBHOOK_FAILED";
                status_at: string;
                webhook_status: | "PENDING"
                | "SUCCEEDED"
                | "FAILED"
                | "CANCELED"
                | "NO_WEBHOOK_PROVIDED";
            };
            AsyncRunRemoteInput: Record<string, unknown>;
            AsyncRunRemoteOutput: { request_id: string };
            CancelAsyncRequestOutput: {
                canceled: boolean;
                message: string;
                request_id: string;
            };
            ErrorResponse: {
                detail?: string;
                error?: string;
                error_code?: | "timeout"
                | "client_error"
                | "model_unavailable"
                | "model_not_ready"
                | "model_does_not_exist"
                | "rate_limited"
                | "payload_too_large"
                | "unauthorized"
                | "application_error"
                | "internal_baseten_error";
            };
            GetAsyncQueueStatusOutput: {
                deployment_id: string;
                model_id: string;
                num_in_progress_requests: number;
                num_queued_requests: number;
            };
            InferenceRetryConfig: {
                initial_delay_ms?: number;
                max_attempts?: number;
                max_delay_ms?: number;
            };
            PredictInput: Record<string, unknown>;
            PredictOutput: Record<string, unknown>;
            RunRemoteInput: Record<string, unknown>;
            RunRemoteOutput: Record<string, unknown>;
        };
    }
    Index
    headers: { "X-BASETEN-REQUEST-ID": string }

    Type Declaration

    • X-BASETEN-REQUEST-ID: string

      Unique identifier for the request.

    parameters: { deployment_id: string; env_name: string; request_id: string }

    Type Declaration

    • deployment_id: string

      The alphanumeric ID of the deployment.

    • env_name: string

      The name of the environment (e.g. production, staging).

    • request_id: string

      The ID of the async request.

    pathItems: never
    requestBodies: {
        AsyncPredictInput: {
            content: {
                "application/json": components["schemas"]["AsyncPredictRequest"];
            };
        };
        AsyncRunRemoteInput: {
            content: {
                "application/json": components["schemas"]["AsyncRunRemoteInput"];
            };
        };
        PredictInput: {
            content: {
                "application/json": components["schemas"]["PredictInput"];
                "application/octet-stream": string;
                "multipart/form-data": Record<string, unknown>;
            };
        };
        RunRemoteInput: {
            content: {
                "application/json": components["schemas"]["RunRemoteInput"];
            };
        };
    }

    Type Declaration

    • AsyncPredictInput: {
          content: {
              "application/json": components["schemas"]["AsyncPredictRequest"];
          };
      }

      There is a 256 KiB size limit on async predict request payloads.

    • AsyncRunRemoteInput: {
          content: {
              "application/json": components["schemas"]["AsyncRunRemoteInput"];
          };
      }
    • PredictInput: {
          content: {
              "application/json": components["schemas"]["PredictInput"];
              "application/octet-stream": string;
              "multipart/form-data": Record<string, unknown>;
          };
      }
    • RunRemoteInput: { content: { "application/json": components["schemas"]["RunRemoteInput"] } }
    responses: {
        AsyncPredictOutput: {
            content: {
                "application/json": components["schemas"]["AsyncPredictOutput"];
            };
            headers: { [name: string]: unknown };
        };
        AsyncRunRemoteOutput: {
            content: {
                "application/json": components["schemas"]["AsyncRunRemoteOutput"];
            };
            headers: { [name: string]: unknown };
        };
        CancelAsyncRequestOutput: {
            content: {
                "application/json": components["schemas"]["CancelAsyncRequestOutput"];
            };
            headers: { [name: string]: unknown };
        };
        Error: {
            content: { "application/json": components["schemas"]["ErrorResponse"] };
            headers: { [name: string]: unknown };
        };
        GetAsyncQueueStatusOutput: {
            content: {
                "application/json": components["schemas"]["GetAsyncQueueStatusOutput"];
            };
            headers: { [name: string]: unknown };
        };
        GetAsyncRequestStatusOutput: {
            content: {
                "application/json": components["schemas"]["AsyncRequestStatusResponse"];
            };
            headers: { [name: string]: unknown };
        };
        PredictOutput: {
            content: {
                "application/json": components["schemas"]["PredictOutput"];
                "application/octet-stream": string;
            };
            headers: {
                "X-BASETEN-REQUEST-ID": components["headers"]["X-BASETEN-REQUEST-ID"];
                [name: string]: unknown;
            };
        };
        RunRemoteOutput: {
            content: {
                "application/json": components["schemas"]["RunRemoteOutput"];
            };
            headers: {
                "X-BASETEN-REQUEST-ID": components["headers"]["X-BASETEN-REQUEST-ID"];
                [name: string]: unknown;
            };
        };
    }

    Type Declaration

    • AsyncPredictOutput: {
          content: {
              "application/json": components["schemas"]["AsyncPredictOutput"];
          };
          headers: { [name: string]: unknown };
      }

      Async predict request enqueued.

    • AsyncRunRemoteOutput: {
          content: {
              "application/json": components["schemas"]["AsyncRunRemoteOutput"];
          };
          headers: { [name: string]: unknown };
      }

      Async run remote request enqueued.

    • CancelAsyncRequestOutput: {
          content: {
              "application/json": components["schemas"]["CancelAsyncRequestOutput"];
          };
          headers: { [name: string]: unknown };
      }

      Result of an async request cancellation.

    • Error: {
          content: { "application/json": components["schemas"]["ErrorResponse"] };
          headers: { [name: string]: unknown };
      }

      Error response.

    • GetAsyncQueueStatusOutput: {
          content: {
              "application/json": components["schemas"]["GetAsyncQueueStatusOutput"];
          };
          headers: { [name: string]: unknown };
      }

      Async queue status for a deployment.

    • GetAsyncRequestStatusOutput: {
          content: {
              "application/json": components["schemas"]["AsyncRequestStatusResponse"];
          };
          headers: { [name: string]: unknown };
      }

      Current status of an async request.

    • PredictOutput: {
          content: {
              "application/json": components["schemas"]["PredictOutput"];
              "application/octet-stream": string;
          };
          headers: {
              "X-BASETEN-REQUEST-ID": components["headers"]["X-BASETEN-REQUEST-ID"];
              [name: string]: unknown;
          };
      }

      Successful synchronous prediction.

    • RunRemoteOutput: {
          content: {
              "application/json": components["schemas"]["RunRemoteOutput"];
          };
          headers: {
              "X-BASETEN-REQUEST-ID": components["headers"]["X-BASETEN-REQUEST-ID"];
              [name: string]: unknown;
          };
      }

      Successful synchronous chain execution.

    schemas: {
        AsyncPredictOutput: { request_id: string };
        AsyncPredictRequest: {
            inference_retry_config?: components["schemas"]["InferenceRetryConfig"];
            max_time_in_queue_seconds?: number;
            model_input: Record<string, unknown>;
            priority?: number;
            webhook_endpoint?: string;
        };
        AsyncRequestError: {
            code: | "MODEL_PREDICT_ERROR"
            | "MODEL_PREDICT_TIMEOUT"
            | "MODEL_NOT_READY"
            | "MODEL_DOES_NOT_EXIST"
            | "MODEL_UNAVAILABLE"
            | "MODEL_INVALID_INPUT"
            | "ASYNC_REQUEST_NOT_SUPPORTED"
            | "INTERNAL_SERVER_ERROR";
            message: string;
        };
        AsyncRequestStatusResponse: {
            chain_id?: string;
            created_at: string;
            deployment_id: string;
            errors: components["schemas"]["AsyncRequestError"][];
            model_id?: string;
            request_id: string;
            status: | "QUEUED"
            | "IN_PROGRESS"
            | "SUCCEEDED"
            | "FAILED"
            | "EXPIRED"
            | "CANCELED"
            | "WEBHOOK_FAILED";
            status_at: string;
            webhook_status: | "PENDING"
            | "SUCCEEDED"
            | "FAILED"
            | "CANCELED"
            | "NO_WEBHOOK_PROVIDED";
        };
        AsyncRunRemoteInput: Record<string, unknown>;
        AsyncRunRemoteOutput: { request_id: string };
        CancelAsyncRequestOutput: {
            canceled: boolean;
            message: string;
            request_id: string;
        };
        ErrorResponse: {
            detail?: string;
            error?: string;
            error_code?: | "timeout"
            | "client_error"
            | "model_unavailable"
            | "model_not_ready"
            | "model_does_not_exist"
            | "rate_limited"
            | "payload_too_large"
            | "unauthorized"
            | "application_error"
            | "internal_baseten_error";
        };
        GetAsyncQueueStatusOutput: {
            deployment_id: string;
            model_id: string;
            num_in_progress_requests: number;
            num_queued_requests: number;
        };
        InferenceRetryConfig: {
            initial_delay_ms?: number;
            max_attempts?: number;
            max_delay_ms?: number;
        };
        PredictInput: Record<string, unknown>;
        PredictOutput: Record<string, unknown>;
        RunRemoteInput: Record<string, unknown>;
        RunRemoteOutput: Record<string, unknown>;
    }

    Type Declaration

    • AsyncPredictOutput: { request_id: string }
      • request_id: string

        The ID of the async request.

    • AsyncPredictRequest: {
          inference_retry_config?: components["schemas"]["InferenceRetryConfig"];
          max_time_in_queue_seconds?: number;
          model_input: Record<string, unknown>;
          priority?: number;
          webhook_endpoint?: string;
      }
      • Optionalinference_retry_config?: components["schemas"]["InferenceRetryConfig"]
      • Optionalmax_time_in_queue_seconds?: number

        Maximum time in seconds a request will spend in the queue before expiring. Must be between 10 seconds and 72 hours.

      • model_input: Record<string, unknown>

        JSON-serializable model input.

      • Optionalpriority?: number

        Priority of the request. Lower values are higher priority.

      • Optionalwebhook_endpoint?: string

        Format: uri

        HTTPS URL to receive the prediction result via webhook. Both HTTP/2 and HTTP/1.1 are supported. If omitted, the model must save outputs so they can be accessed later.

    • AsyncRequestError: {
          code:
              | "MODEL_PREDICT_ERROR"
              | "MODEL_PREDICT_TIMEOUT"
              | "MODEL_NOT_READY"
              | "MODEL_DOES_NOT_EXIST"
              | "MODEL_UNAVAILABLE"
              | "MODEL_INVALID_INPUT"
              | "ASYNC_REQUEST_NOT_SUPPORTED"
              | "INTERNAL_SERVER_ERROR";
          message: string;
      }
      • code:
            | "MODEL_PREDICT_ERROR"
            | "MODEL_PREDICT_TIMEOUT"
            | "MODEL_NOT_READY"
            | "MODEL_DOES_NOT_EXIST"
            | "MODEL_UNAVAILABLE"
            | "MODEL_INVALID_INPUT"
            | "ASYNC_REQUEST_NOT_SUPPORTED"
            | "INTERNAL_SERVER_ERROR"

        The type of error that occurred.

      • message: string

        Details of the error.

    • AsyncRequestStatusResponse: {
          chain_id?: string;
          created_at: string;
          deployment_id: string;
          errors: components["schemas"]["AsyncRequestError"][];
          model_id?: string;
          request_id: string;
          status:
              | "QUEUED"
              | "IN_PROGRESS"
              | "SUCCEEDED"
              | "FAILED"
              | "EXPIRED"
              | "CANCELED"
              | "WEBHOOK_FAILED";
          status_at: string;
          webhook_status: | "PENDING"
          | "SUCCEEDED"
          | "FAILED"
          | "CANCELED"
          | "NO_WEBHOOK_PROVIDED";
      }
      • Optionalchain_id?: string

        The ID of the chain that executed the request. Present for chain requests.

      • created_at: string

        The time in UTC at which the async request was created.

      • deployment_id: string

        The ID of the deployment that executed the request.

      • errors: components["schemas"]["AsyncRequestError"][]

        Errors that occurred while processing the async request. Empty if no errors occurred.

        []
        
      • Optionalmodel_id?: string

        The ID of the model that executed the request. Present for model requests.

      • request_id: string

        The ID of the async request.

      • status:
            | "QUEUED"
            | "IN_PROGRESS"
            | "SUCCEEDED"
            | "FAILED"
            | "EXPIRED"
            | "CANCELED"
            | "WEBHOOK_FAILED"

        The status of the async request.

      • status_at: string

        The time in UTC at which the async request's status was last updated.

      • webhook_status: "PENDING" | "SUCCEEDED" | "FAILED" | "CANCELED" | "NO_WEBHOOK_PROVIDED"

        The status of sending the prediction result to the provided webhook.

    • AsyncRunRemoteInput: Record<string, unknown>

      JSON input matching the chain's run_remote method signature.

    • AsyncRunRemoteOutput: { request_id: string }
      • request_id: string

        The ID of the async request.

    • CancelAsyncRequestOutput: { canceled: boolean; message: string; request_id: string }
      • canceled: boolean

        Whether the request was canceled.

      • message: string

        Additional details about whether the request was canceled.

      • request_id: string

        The ID of the async request.

    • ErrorResponse: {
          detail?: string;
          error?: string;
          error_code?:
              | "timeout"
              | "client_error"
              | "model_unavailable"
              | "model_not_ready"
              | "model_does_not_exist"
              | "rate_limited"
              | "payload_too_large"
              | "unauthorized"
              | "application_error"
              | "internal_baseten_error";
      }
      • Optionaldetail?: string

        Additional error details, if available.

      • Optionalerror?: string

        Human-readable error message.

      • Optionalerror_code?:
            | "timeout"
            | "client_error"
            | "model_unavailable"
            | "model_not_ready"
            | "model_does_not_exist"
            | "rate_limited"
            | "payload_too_large"
            | "unauthorized"
            | "application_error"
            | "internal_baseten_error"

        Machine-readable error code.

    • GetAsyncQueueStatusOutput: {
          deployment_id: string;
          model_id: string;
          num_in_progress_requests: number;
          num_queued_requests: number;
      }
      • deployment_id: string

        The ID of the deployment.

      • model_id: string

        The ID of the model.

      • num_in_progress_requests: number

        Number of requests currently being processed by the model.

      • num_queued_requests: number

        Number of requests with QUEUED status awaiting processing.

    • InferenceRetryConfig: { initial_delay_ms?: number; max_attempts?: number; max_delay_ms?: number }

      Exponential backoff parameters for retrying predict requests.

      • Optionalinitial_delay_ms?: number

        Minimum time between retries in milliseconds.

      • Optionalmax_attempts?: number

        Number of predict request attempts.

      • Optionalmax_delay_ms?: number

        Maximum time between retries in milliseconds.

    • PredictInput: Record<string, unknown>

      JSON-serializable model input. The shape is defined by the model's predict function.

    • PredictOutput: Record<string, unknown>

      JSON-serializable output. The shape is defined by the model.

    • RunRemoteInput: Record<string, unknown>

      JSON input matching the chain's run_remote method signature.

    • RunRemoteOutput: Record<string, unknown>

      JSON-serializable output. The shape is defined by the chain.