Skip to content

Create a Scene session (v3)

Shows how to use the unified v3 Sessions API to create a full 3D scene generation — CSM's headline capability distinguishing it from single-object generators.

This example assumes using CsmAi; is in scope and apiKey contains your CsmAi API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
using var client = new CsmAiClient(apiKey);

// Create a scene session using the unified v3 Sessions API.
var session = await client.Sessions.CreateSessionAsync(
    new CreateSessionRequest
    {
        Type = SessionType.Scene,
        Input = new SessionInput
        {
            Prompt = "a cozy medieval village at sunset with cobblestone streets",
        },
    });

Console.WriteLine($"Scene session id: {session.Id ?? session.SessionCode}");