> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.api.odyssey.ml/llms.txt
> Use this file to discover all available pages before exploring further.

# Odyssey-3

> Use the familiar Streaming and Simulation workflows with O3 model selection and action controls.

Odyssey-3 uses the same SDK client and lifecycle as Odyssey-2 Max.
You still authenticate, connect, start a stream, observe video, interact, stop, and disconnect.
O3 adds action controls alongside prompt interactions.
The O3 execution profile supports landscape output; pass `portrait=False` / `portrait: false` when starting generation.

## Choose a model

Pass `model` when you create the client to select Odyssey-3 for Streaming.
Your account must have access to that model and available capacity.
Omitting `model` preserves the server's default selection.

```python Python theme={null}
import os
from odyssey import Odyssey

client = Odyssey(
    api_key=os.environ["ODYSSEY_API_KEY"],
    model="odyssey-3",
    target_width=1280,
    target_height=720,
    target_fps=16,
)
```

```typescript JavaScript theme={null}
import { Odyssey } from '@odysseyml/odyssey';

const client = new Odyssey({
  apiKey: apiKeyFromYourSecureConfiguration,
  model: 'odyssey-3',
  targetWidth: 1280,
  targetHeight: 720,
  targetFps: 16,
});
```

For a browser application, keep your long-lived API key on your server and use [client credentials](https://documentation.api.odyssey.ml/client-credentials.md).
Model and output settings are selected by the server-side client that creates those credentials.
The browser connects using the resulting short-lived credentials.

## Keep the same Streaming workflow

| Step | Python | JavaScript |
| - | - | - |
| Connect | `await client.connect(...)` | `await client.connect(handlers)` |
| Start | `await client.start_stream(prompt, portrait=False)` | `await client.startStream({prompt, portrait: false})` |
| Observe | `on_video_frame(frame)` receives RGB arrays | Attach the returned `MediaStream` to a video element |
| Change the prompt | `await client.interact(prompt)` | `await client.interact({prompt})` |
| Send O3 controls | `await client.send_action_controls(snapshot)` | `client.sendActionControls(snapshot)` |
| End the stream | `await client.end_stream()` | `await client.endStream()` |
| Release the connection | `await client.disconnect()` | `client.disconnect()` |

Always release the connection in a `finally` block or your UI's cleanup handler.
You can start another stream on the same connection after the previous stream ends.
Each stream has its own recording ID.

Prompt interactions resolve when the server acknowledges the prompt.
Controls return a local send sequence; they have no equivalent live server acknowledgement.
Read [action controls](https://documentation.api.odyssey.ml/action-controls.md) for held inputs, release behavior, camera movement, and recording evidence.

## Input and output

Pass an image through the existing `image` option on `start_stream()` or `startStream()` when your assigned session advertises image-to-video support.
Python accepts the image formats described in its [client reference](https://documentation.api.odyssey.ml/sdk/python/client.md); browser JavaScript accepts `File` or `Blob`.

`target_width` / `targetWidth` and `target_height` / `targetHeight` request the WebRTC delivery resolution.
Supply both dimensions together as even integers.
Inspect actual incoming frame dimensions or `video.videoWidth` and `video.videoHeight`.
The requested live resolution does not set the saved recording or Simulation resolution; inspect those artifacts separately.

## Simulation

Use the existing asynchronous `simulate()` method and timestamped script format.
A script entry contains exactly one action: `start`, `interact`, `action_controls`, or `end`.
Timestamps are milliseconds on the generated video timeline, rather than delays between HTTP requests.

Simulation selects its execution profile on the server.
The Streaming `model` constructor option does not override Simulation's profile.
Inspect the completed job's `execution_receipt` for its actual model runtime and effective behavior.

The SDK exposes optional `runtime_behavior` / `runtimeBehavior`, `initialization_behavior` / `initializationBehavior`, and `dynamic_action_enhancement` / `dynamicActionEnhancement` settings for supported Simulation workflows.
These settings are separate from live Streaming options and remain subject to account permissions.
The default Simulation request also asks for a separate controls-overlay video; `controls_overlay=False` / `controlsOverlay: false` opts out while retaining the raw video.

See [Python Simulation](https://documentation.api.odyssey.ml/sdk/python/simulations.md) and [JavaScript Simulation](https://documentation.api.odyssey.ml/sdk/javascript/simulations.md) for submission, status, cancellation, and recording retrieval.

## Use Staging explicitly

Production remains the default API origin.
For a Staging account and key, add the matching origin to your client configuration:

```python Python theme={null}
client = Odyssey(
    api_key=os.environ["ODYSSEY_API_KEY"],
    api_url="https://staging.api.odyssey.ml",
    model="odyssey-3",
)
```

```typescript JavaScript theme={null}
const client = new Odyssey({
  apiKey: stagingApiKeyFromYourSecureConfiguration,
  apiUrl: 'https://staging.api.odyssey.ml',
  model: 'odyssey-3',
});
```

Create Staging app keys at [staging.developer.odyssey.ml](https://staging.developer.odyssey.ml/dashboard).
Keys, account permissions, usage, and capacity are specific to their environment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.