> ## 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.

# 埋め込み

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

**メソッド**: `client.generate_embedding()`。

### 例

```python theme={null}
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）

```json theme={null}
{
  "data": [
    {
      "embedding": [0.1, 0.2, 0.3],
      "index": 0
    }
  ],
  "usage": {
    "prompt_tokens": 5,
    "total_tokens": 5
  }
}
```


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