# `Gemini.Types.Live.RealtimeInput`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.15.0/lib/gemini/types/live/realtime_input.ex#L1)

Realtime input for Live API sessions.

User input that is sent in real time. Different from ClientContent in that:
- Can be sent continuously without interrupting model generation
- End of turn is derived from user activity (e.g., end of speech)
- Data is processed incrementally for fast response start
- Always assumed to be user's input (cannot populate conversation history)

## Fields

- `media_chunks` - Deprecated: Use audio, video, or text instead
- `audio` - Realtime audio input stream
- `video` - Realtime video input stream
- `text` - Realtime text input stream
- `activity_start` - Marks start of user activity (only with manual detection)
- `activity_end` - Marks end of user activity (only with manual detection)
- `audio_stream_end` - Indicates audio stream has ended (e.g., mic off)

## Example

    # Audio input
    %RealtimeInput{
      audio: %{mime_type: "audio/pcm", data: base64_audio_data}
    }

    # Text input
    %RealtimeInput{text: "Hello, how are you?"}

# `t`

```elixir
@type t() :: %Gemini.Types.Live.RealtimeInput{
  activity_end: boolean() | nil,
  activity_start: boolean() | nil,
  audio: Gemini.Types.Blob.t() | map() | nil,
  audio_stream_end: boolean() | nil,
  media_chunks: [Gemini.Types.Blob.t() | map()] | nil,
  text: String.t() | nil,
  video: Gemini.Types.Blob.t() | map() | nil
}
```

# `from_api`

```elixir
@spec from_api(map() | nil) :: t() | nil
```

Parses from API response.

# `new`

```elixir
@spec new(keyword()) :: t()
```

Creates a new RealtimeInput.

# `to_api`

```elixir
@spec to_api(t() | nil) :: map() | nil
```

Converts to API format (camelCase).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
