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 91011121314
usingvarclient=newCsmAiClient(apiKey);// Create a scene session using the unified v3 Sessions API.varsession=awaitclient.Sessions.CreateSessionAsync(newCreateSessionRequest{Type=SessionType.Scene,Input=newSessionInput{Prompt="a cozy medieval village at sunset with cobblestone streets",},});Console.WriteLine($"Scene session id: {session.Id ?? session.SessionCode}");