Qubittron Bastion
TypeScript SDKAPI reference

API reference

Every public class, method, and type exported by the Bastion TypeScript SDK.

The SDK's public surface is exported from a single entry point: @qubittron/bastion-sdk. Everything documented here is type-checked against the source in packages/sdk/src.

Entry point

import {
  Bastion,
  Stream,
  // error classes
  BastionError,
  APIError,
  APIConnectionError,
  AuthenticationError,
  BadRequestError,
  NotFoundError,
  PermissionDeniedError,
  RateLimitError,
  UpstreamError,
  // constants
  SpeechEncoding,
} from "@qubittron/bastion-sdk";

import type {
  // chat
  ChatCompletion,
  ChatCompletionChunk,
  ChatCompletionCreateParams,
  ChatCompletionCreateParamsNonStreaming,
  ChatCompletionCreateParamsStreaming,
  ChatChoiceDelta,
  // client
  ClientOptions,
  // images
  ImageData,
  ImageGenerateParams,
  ImageGenerateResponse,
  // models
  Model,
  ModelList,
  // audio
  SpeechParams,
  SpeechResponse,
  TranscriptionParams,
  TranscriptionResponse,
  TranscriptionSegment,
} from "@qubittron/bastion-sdk";

ChatChoice, ChatMessage, and TokenUsage are re-exported from @qubi_bastion/shared and are part of the public type surface.

Resources

On this page