# `Gemini.Types.Response.InlinedEmbedContentResponse`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/response/inlined_embed_content_response.ex#L1)

Response for a single request within an async batch.

This is a union type - exactly ONE of `response` or `error` will be set.

## Union Type - ONE will be set:

- `response`: Successful EmbedContentResponse
- `error`: Error status if request failed

## Fields

- `metadata`: Optional metadata from the request
- `response`: Successful embedding response (if successful)
- `error`: Error details (if failed)

## Examples

    # Successful response
    %InlinedEmbedContentResponse{
      metadata: %{"id" => "123"},
      response: %EmbedContentResponse{...},
      error: nil
    }

    # Failed response
    %InlinedEmbedContentResponse{
      metadata: %{"id" => "456"},
      response: nil,
      error: %{"code" => 400, "message" => "Invalid input"}
    }

# `t`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/response/inlined_embed_content_response.ex#L39)

```elixir
@type t() :: %Gemini.Types.Response.InlinedEmbedContentResponse{
  error: map() | nil,
  metadata: map() | nil,
  response: Gemini.Types.Response.EmbedContentResponse.t() | nil
}
```

# `error?`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/response/inlined_embed_content_response.ex#L89)

```elixir
@spec error?(t()) :: boolean()
```

Checks if the inlined response is an error.

## Examples

    InlinedEmbedContentResponse.error?(response)
    # => false

# `from_api_response`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/response/inlined_embed_content_response.ex#L60)

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

Creates an inlined response from API response data.

## Parameters

- `data`: Map containing the API response

## Examples

    InlinedEmbedContentResponse.from_api_response(%{
      "metadata" => %{"id" => "123"},
      "response" => %{"embedding" => %{"values" => [...]}}
    })

# `success?`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.11.0/lib/gemini/types/response/inlined_embed_content_response.ex#L77)

```elixir
@spec success?(t()) :: boolean()
```

Checks if the inlined response is successful.

## Examples

    InlinedEmbedContentResponse.success?(response)
    # => true

---

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