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

# 埋め込み

> Ruby SDKで/embeddingsを呼び出します。

**メソッド**: `client.generate_embedding(...)`または`client.create_embedding(...)`。

### 例

```ruby theme={null}
require 'phaseo_sdk'

client = PhaseoSdk::Phaseo.new(api_key: ENV.fetch("PHASEO_API_KEY"))
embedding = client.generate_embedding(
  model: 'openai/text-embedding-3-large',
  input: 'Sample text'
)
```

### 主なパラメーター

* `model`（必須）：埋め込みモデルのID（例：`openai/text-embedding-3-large`）。
* `input`（必須）：文字列または文字列の配列。
* `encoding_format`：`float`（デフォルト）または`base64`。
* `dimensions`：埋め込みの長さを切り詰めるための任意の整数（モデルに依存）。
* `user`：エンドユーザー用の任意のタグ。

### 戻り値

埋め込みペイロード（JSON）


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