Your server prepares worlds and exports artifacts through the HappyOyster Open APIs; the client SDK handles the RTC connection and real-time interaction.
HappyOyster follows a server + client split: your server manages worlds and artifacts via the Open APIs, and the client SDK delivers the real-time experience. Before you start, complete Get Authentication Credentials.
The SDK handles the RTC connection, video playback, and interaction commands.
After the Travel ends, poll with the primary API Key on Adventure-Query Travel Artifacts / Directing-Query Travel Artifacts / Acting-Query Travel Artifacts until
- Server-side Open APIs are split by experience mode into Adventure, Directing, and Acting. Choose the endpoints that match your mode.
- A World and a Travel are strictly bound to the model that created them; cross-model access returns
403001(world) or404000(travel). - The SDK is not responsible for creating or managing worlds; it only delivers the client-side real-time experience.
1. Prepare a World (Server Open API)
- Create a World, using the endpoint for your mode: Adventure-Create World / Directing-Create World / Acting-Create World.
- Poll the build status (every 3–5 seconds) until
ready: Adventure-Query World Build Status / Directing-Query World Build Status / Acting-Query World Build Status. - Exchange for a ticket: With the primary API Key, call Adventure-Get Travel Credential / Directing-Get Travel Credential / Acting-Get Travel Credential to obtain a one-time
ticket. - Deliver credentials to the client: Send the
tickettogether with the temporary API Key (used as the SDK'stoken) to the client.
2. Real-time Experience (Client SDK)
The SDK handles the RTC connection, video playback, and interaction commands.
-
Initialize the SDK:
initialize+updateToken— inject the API Host and the temporary API Key. -
Start the session:
startTravel(ticket); the SDK enters the room and establishes the connection automatically. -
Attach the video: Add the view returned by
attachVideo()to your layout. For Acting, set the container orientation according to theaspectRatioreturned when entering the room. -
Real-time interaction:
- Adventure: Call
sendCommandto send directional / camera / action commands. - Directing: Call
sendInstructto send text instructions that drive the story. - Acting: Call
sendInstructto send text instructions.
- Adventure: Call
-
Session control:
- Adventure: Pause and rewind are not supported.
- Directing: Supports
pause,rewind, andresume. - Acting: Supports
pauseandresume;rewindis not supported.
-
End the session:
endTravelreleases RTC and resources.
3. Retrieve Artifacts (Server Open API)
After the Travel ends, poll with the primary API Key on Adventure-Query Travel Artifacts / Directing-Query Travel Artifacts / Acting-Query Travel Artifacts until composeStatus = ready. For external delivery, we recommend video.withInstructionAndWatermark (composed with instructions and watermark).
Next Steps
- Download SDKs and Demos: SDK packages, integration guides, API references, and open-source demos for each platform.