Skip to content
Roblox API Reference

GenerationService

Service that allows developers to generate 3D objects from text prompts.
  • Not creatable
  • Service
Memory category
Instances
Own members
19
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods59

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byGenerationService17
  • GenerationService:ConnectAsync(sessionId: string,sdp: string,type: string,relay: string,): ...any
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Parameters
    Parameter
    sessionId: string
    sdp: string
    type: string
    relay: string
    Returns
    Type
    ...any
  • GenerationService:DisconnectAsync(sessionId: string): boolean
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Parameters
    Parameter
    sessionId: string
    Returns
    Type
    boolean
  • GenerationService:ExportInstanceToGlbAsync(rootInstance: Instance,userId: number,): string
    • Yields
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    rootInstance: Instance
    userId: number
    Returns
    Type
    string
  • GenerationService:ExportMeshToGlbAsync(meshPart: MeshPart): string
    • Yields
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    meshPart: MeshPart
    Returns
    Type
    string
  • GenerationService:GenerateAnimationAsync(inputs: { [string]: any },options: { [string]: any }?,progressCallback: ((...any) -> ...any)?,): ...any
    • Yields
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    inputs: { [string]: any }
    options: { [string]: any }?
    progressCallback: ((...any) -> ...any)?
    Returns
    Type
    ...any
  • GenerationService:GenerateMeshAsync(inputs: { [string]: any },player: Player,options: { [string]: any },intermediateResultCallback: ((...any) -> ...any)?,): ...any
    Starts the generation of a new 3D mesh from a text prompt and returns unique IDs used to track and retrieve the result.
    • Yields
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    inputs: { [string]: any }
    A dictionary containing the mesh generation prompts. Currently, the only supported key is the Prompt (string) that describes the mesh to generate.
    player: Player
    The Player requesting the generation.
    options: { [string]: any }
    A dictionary for additional generation options to influence the result. The optional SuggestedSize key (Vector3) represents a size guide for the generated asset, meaning GenerationService will attempt to create a model with a size and proportion similar to the provided Vector3, although there is no guarantee on the final output size.
    intermediateResultCallback: ((...any) -> ...any)?
    A callback function triggered with intermediate generation results. Useful for retrieving early mesh versions before textures are applied.
    Returns
    TypeDescription
    ...any
    A tuple of the generation ID (a unique ID returned for each invocation of GenerateMeshAsync()) and context ID (not currently used).
  • GenerationService:GenerateModelAsync(inputs: { [string]: any },schema: { [string]: any },options: { [string]: any }?,): ...any
    Enables generation of multi-mesh geometries according to provided inputs and a schema.
    • Yields
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    inputs: { [string]: any }
    A table representing conditioning inputs with the following keys:
    • TextPrompt — String description of the object to generate. Required unless an Image is provided; you must supply at least one of TextPrompt or Image.
    • Image — Optional Content referencing an image asset (for example, the result of Content.fromAssetId()) used to visually condition the generation. Supply it together with or instead of TextPrompt.
    • Size — Optional Vector3 describing the object size to generate. This is only approximate; scale the model extents post‑generation if you need a specific size.
    • MaxTriangles — Optional integer describing the maximum number of triangles that the returned model will contain. Lower values result in more faceted and low-poly generations.
    • GenerateTextures — true (default) textures the resulting generation, while false will not generate textures.
    schema: { [string]: any }
    Table representing the generation schema. Provide exactly one of the following keys:
    • PredefinedSchema — String selecting a built-in schema. Current valid options are Car5 for a basic vehicle chassis consisting of five Models, or Body1 which results in a single mesh output.
    • SchemaDefinition — Table describing a custom multi-part structure. It contains a Groups array of part-name strings (one entry per desired part); the returned Model is organized to match the named groups. Use this instead of PredefinedSchema when you need a structure the predefined schemas don't cover.
    options: { [string]: any }?
    Currently not used; reserved for future customization options.
    Returns
    TypeDescription
    ...any
    Tuple with the following elements:
    • A standard Model container instance that is compliant with the specified schema.
    • A table containing a UUID and other metadata about the generation.
  • GenerationService:GetVideoGenSessionAsync(): ...any
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Returns
    Type
    ...any
  • GenerationService:GetVideoGenTriggersAsync(sessionId: string,lookbackSeconds: number,): { [string]: any }
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Parameters
    Parameter
    sessionId: string
    lookbackSeconds: number
  • GenerationService:InternalGenerateMeshAsync(inputs: { [string]: any },userId: number,options: { [string]: any },intermediateResultCallback: ((...any) -> ...any)?,): ...any
    • Yields
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    inputs: { [string]: any }
    userId: number
    options: { [string]: any }
    intermediateResultCallback: ((...any) -> ...any)?
    Returns
    Type
    ...any
  • GenerationService:LoadGeneratedMeshAsync(generationId: string): MeshPart
    Retrieves and loads a mesh generated by GenerationService:GenerateMeshAsync() using the provided generationId.
    • Yields
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    generationId: string
    The unique ID returned by GenerateMeshAsync(). Identifies the mesh to load.
    Returns
    TypeDescription
    MeshPart
    The generated asset, returned as a Model with a single MeshPart containing an EditableMesh.
  • GenerationService:LoadModelFromGlbAsync(glbPath: string): Model
    • Yields
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    glbPath: string
    Returns
    Type
    Model
  • GenerationService:LoadModelFromUrlAsync(url: string): Model
    • Yields
    • Roblox script security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    url: string
    Returns
    Type
    Model
  • GenerationService:SegmentMeshAsync(meshPart: MeshPart,schema: { [string]: any },options: { [string]: any }?,): ...any
    Segments an existing MeshPart into multiple named parts according to a provided schema, returning a Model organized by the schema groups.
    • Yields
    • Capabilities: DynamicGeneration
    Parameters
    ParameterDescription
    meshPart: MeshPart
    The MeshPart to segment. Must contain mesh geometry (either an EditableMesh or a published mesh asset the caller has edit permission for).
    schema: { [string]: any }
    A table specifying how to segment the mesh. Provide exactly one of PredefinedSchema (a string such as "Car5" or "Body1") or SchemaDefinition (a table with a Groups array of part-name strings defining the segmentation structure).
    options: { [string]: any }?
    Has no effect.
    Returns
    TypeDescription
    ...any
    A tuple containing a Model whose children are organized according to the specified schema (each group as a child Model with a MeshPart inside), and a table with a UUID key holding the backend job identifier.
  • GenerationService:StartVideoGenSessionAsync(sessionId: string,prompt: string,imageData: string,imageS3Reference: string,triggers: { [string]: any },): boolean
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Parameters
    Parameter
    sessionId: string
    prompt: string
    imageData: string
    imageS3Reference: string
    triggers: { [string]: any }
    Returns
    Type
    boolean
  • GenerationService:UpdateVideoGenSessionPromptAsync(sessionId: string,prompt: string,imageData: string,imageS3Reference: string,mode: string,): boolean
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Parameters
    Parameter
    sessionId: string
    prompt: string
    imageData: string
    imageS3Reference: string
    mode: string
    Returns
    Type
    boolean
  • GenerationService:UpdateVideoGenSessionTriggersAsync(sessionId: string,triggers: { [string]: any },): boolean
    • Yields
    • Capabilities: DynamicGeneration + InternalTest
    Parameters
    Parameter
    sessionId: string
    triggers: { [string]: any }
    Returns
    Type
    boolean

Events12

Inherited fromObject1
Inherited fromInstance9
Defined byGenerationService2
  • GenerationService.ReplicateGeneration: RBXScriptSignal<(id: string,success: boolean,serializedModel: string,)>
    • Hidden
    • Roblox engine security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    id: string
    success: boolean
    serializedModel: string
  • GenerationService.RequestGenerationReplication: RBXScriptSignal<(id: string)>
    • Hidden
    • Roblox engine security
    • Capabilities: DynamicGeneration
    Parameters
    Parameter
    id: string