# `Codex.Realtime.ModelInputs`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.18.1/lib/codex/realtime/model_inputs.ex#L1)

Input message types for sending events to the realtime model.

These structs represent commands that can be sent to the realtime
WebSocket connection, such as sending audio, user input, or tool outputs.

# `send_event`

```elixir
@type send_event() ::
  Codex.Realtime.ModelInputs.SendRawMessage.t()
  | Codex.Realtime.ModelInputs.SendUserInput.t()
  | Codex.Realtime.ModelInputs.SendAudio.t()
  | Codex.Realtime.ModelInputs.SendToolOutput.t()
  | Codex.Realtime.ModelInputs.SendInterrupt.t()
  | Codex.Realtime.ModelInputs.SendSessionUpdate.t()
```

# `send_audio`

```elixir
@spec send_audio(binary(), boolean()) :: Codex.Realtime.ModelInputs.SendAudio.t()
```

Create a send audio event.

# `send_interrupt`

```elixir
@spec send_interrupt(boolean()) :: Codex.Realtime.ModelInputs.SendInterrupt.t()
```

Create a send interrupt event.

# `send_raw_message`

```elixir
@spec send_raw_message(map()) :: Codex.Realtime.ModelInputs.SendRawMessage.t()
```

Create a send raw message event.

# `send_session_update`

```elixir
@spec send_session_update(Codex.Realtime.Config.SessionModelSettings.t()) ::
  Codex.Realtime.ModelInputs.SendSessionUpdate.t()
```

Create a send session update event.

# `send_tool_output`

```elixir
@spec send_tool_output(
  Codex.Realtime.ModelEvents.ToolCallEvent.t(),
  String.t(),
  boolean()
) ::
  Codex.Realtime.ModelInputs.SendToolOutput.t()
```

Create a send tool output event.

# `send_user_input`

```elixir
@spec send_user_input(String.t() | map()) ::
  Codex.Realtime.ModelInputs.SendUserInput.t()
```

Create a send user input event.

# `to_json`

```elixir
@spec to_json(send_event()) :: map() | [map()]
```

Convert send event to JSON for WebSocket.

---

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