API Reference
Complete API reference for the GLabs SDK
API Reference
Complete reference for all exports from @getvrex/glabs-sdk.
GLabsClient
Main client class for interacting with Google Labs APIs.
Constructor
Properties
| Property | Type | Description |
|---|---|---|
accountTier | AccountTier | Configured account tier |
projectId | string | undefined | Configured project ID |
Static Methods
| Method | Returns | Description |
|---|---|---|
generateSessionId() | string | Generate a unique session ID |
Instance Methods
projects.list()
projects.get()
projects.getFirstProjectId()
projects.clearCache()
images.getCreditStatus()
images.upload()
images.generate()
videos.generateTextToVideo()
videos.generateImageToVideo()
videos.extend()
videos.reshoot()
videos.upsample()
videos.generateReferenceImagesVideo()
videos.checkStatus()
Types
GLabsClientConfig
RecaptchaConfig
UploadImageOptions
UploadImageResult
GenerateImageOptions
GenerateImageResult
GeneratedImage
VideoOperationResult
VideoStatusResult
GenerateTextToVideoOptions
GenerateImageToVideoOptions
ExtendVideoOptions
ReshootVideoOptions
UpsampleVideoOptions
Enums and Type Aliases
AccountTier
VideoMode
AspectRatio
ImageModel
ReshootMotionType
Utility Functions
getTierCapabilities
getEffectiveVideoMode
getVideoApiConfig
getImageApiConfig
isFeatureSupported
getVideoAspectRatioEnum
getImageAspectRatioEnum
getVideoModelKey
getPaygateTier
Error Class
GLabsError
Error Codes
| Code | Description |
|---|---|
NETWORK_ERROR | Network request failed |
HIGH_TRAFFIC | Service is busy |
INTERNAL_ERROR | Server-side error |
INVALID_ARGUMENT | Content violates policy |
PERMISSION_DENIED | Authentication failed |
RECAPTCHA_REQUIRED | reCAPTCHA not configured |
RECAPTCHA_TIMEOUT | Token request timed out |
RECAPTCHA_FAILED | Token request failed |
RECAPTCHA_EVAL_FAILED | Token evaluation failed after retries |
RECAPTCHA_API_ERROR | Provider API error |
PARSE_ERROR | Response parsing failed |
UNKNOWN | Unknown error |
Services (Advanced)
For advanced use cases, you can use the services directly:
These are used internally by GLabsClient and are exported for special cases where you need direct access.