# `Gemini.Types.Request.InputEmbedContentConfig`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/request/input_embed_content_config.ex#L1)

Input configuration for async batch embedding.

Specifies where to read batch embedding requests from. This is a union type -
exactly ONE of the fields must be set.

## Union Type - Choose ONE:

- `file_name`: Google Cloud Storage URI (e.g., "gs://bucket/inputs.jsonl")
- `requests`: InlinedEmbedContentRequests for inline processing

Per spec: Cannot specify both. One must be nil.

## Examples

    # File-based input
    InputEmbedContentConfig.new_from_file("gs://my-bucket/embeddings/batch-001.jsonl")

    # Inline requests
    InputEmbedContentConfig.new_from_requests(inlined_requests)

# `t`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/request/input_embed_content_config.ex#L28)

```elixir
@type t() :: %Gemini.Types.Request.InputEmbedContentConfig{
  file_name: String.t() | nil,
  requests: Gemini.Types.Request.InlinedEmbedContentRequests.t() | nil
}
```

# `new_from_file`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/request/input_embed_content_config.ex#L45)

```elixir
@spec new_from_file(String.t()) :: t()
```

Creates input config from a Google Cloud Storage file.

## Parameters

- `file_name`: GCS URI (e.g., "gs://bucket/inputs.jsonl")

## Examples

    InputEmbedContentConfig.new_from_file("gs://my-bucket/batch.jsonl")

# `new_from_requests`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/request/input_embed_content_config.ex#L64)

```elixir
@spec new_from_requests(Gemini.Types.Request.InlinedEmbedContentRequests.t()) :: t()
```

Creates input config from inline requests.

## Parameters

- `requests`: InlinedEmbedContentRequests container

## Examples

    InputEmbedContentConfig.new_from_requests(inlined_requests)

# `to_api_map`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/request/input_embed_content_config.ex#L78)

```elixir
@spec to_api_map(t()) :: map()
```

Converts the input config to API-compatible map format.

For file-based: {"fileName": "gs://..."}
For inline: {"requests": {"requests": [...]}}

# `validate`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/request/input_embed_content_config.ex#L100)

```elixir
@spec validate(t()) :: :ok | {:error, String.t()}
```

Validates that exactly one input source is specified.

## Returns

- `:ok` if valid
- `{:error, reason}` if invalid

## Examples

    InputEmbedContentConfig.validate(config)

---

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