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

> ## Agent Instructions
> Conare's API is at https://api.conare.ai. Authenticate with `Authorization: Bearer $CONARE_API_KEY`.
> The full OpenAPI spec is at https://api.conare.ai/openapi.yaml; each endpoint has a page under /api-reference, and appending .md to any page URL returns its Markdown.
> Embed with model conare-embed-1; send input_type "query" for search queries. Rerank with conare-rerank-1.
> Prefer the TypeScript SDK (`npm install conare`) or plain HTTP in examples.
> Install the Conare skill with `npx skills add https://docs.conare.ai`; search these docs over MCP at https://docs.conare.ai/mcp; the whole site is at https://docs.conare.ai/llms-full.txt.

# turbopuffer API

> ベース URL を変えて turbopuffer のコードと SDK を Conare で実行します。対応する書き込み、クエリ、呼び出しと制限を説明します。

Conare は turbopuffer の API を `https://api.conare.ai/tpuf` で提供しています。turbopuffer のコードと SDK はそのままで、Conare のキーを使って Conare に向けてください。

```bash curl theme={null}
curl https://api.conare.ai/tpuf/v2/namespaces/products/query \
  -H "Authorization: Bearer $CONARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rank_by": ["vector", "ANN", [0.1, 0.2, 0.3, 0.4]], "top_k": 10}'
```

```python Python theme={null}
import os
import turbopuffer

tpuf = turbopuffer.Turbopuffer(
    api_key=os.environ["CONARE_API_KEY"],
    region="gcp-us-central1",  # any value: Conare ignores it
    base_url="https://api.conare.ai/tpuf/{region}",
)

ns = tpuf.namespace("products")
ns.write(
    upsert_rows=[{"id": 1, "vector": [0.1, 0.2, 0.3, 0.4], "title": "refunds"}],
    distance_metric="cosine_distance",
)
result = ns.query(rank_by=("vector", "ANN", [0.1, 0.2, 0.3, 0.4]), top_k=10)
```

```json Response theme={null}
{
  "billing": { "billable_logical_bytes_queried": 0, "billable_logical_bytes_returned": 0 },
  "performance": { "cache_hit_ratio": 1.0, "cache_temperature": "hot", "query_execution_ms": 0, "server_total_ms": 0 },
  "rows": [{ "$dist": 0.0, "id": 1 }]
}
```

ベクトルは自分で用意します。これらのネームスペースは API の他のネームスペースとは別です。

## サポート対象

| 領域 | サポート内容 |
| - | - |
| 書き込み | アップサート、パッチ、削除、条件付き書き込み、フィルターによる削除またはパッチ |
| クエリ | ベクトル(ANN および厳密)、BM25 全文検索、属性による並べ替え、フィルター、`Count` 集計、1 回の呼び出しで最大 16 クエリ |
| ネームスペース | 一覧、スキーマ、メタデータ、キャッシュのウォームアップ、削除、コピー、ブランチ |
| 距離 | `cosine_distance`, `euclidean_squared` |
| `top_k` | 最大 10,000 |

`group_by` や複数のベクトル列など、それ以外の機能は、その機能名を示すメッセージとともに `400` を返します。

## 制限

| 制限 | |
| - | - |
| クエリ | 組織あたり毎秒 1,000 |
| 書き込み、その他の呼び出し | それぞれ毎秒 100 |
| リクエストボディ | 最大 64 MiB |


## Related topics

- [API の概要](https://docs.conare.ai/ja/api.md)
- [Embed texts (OpenAI-compatible)](https://docs.conare.ai/ja/api-reference/models/embed-texts-openai-compatible.md)
- [Rerank documents (Cohere- and vLLM-compatible)](https://docs.conare.ai/ja/api-reference/models/rerank-documents-cohere-and-vllm-compatible.md)
- [Rerank documents (Cohere v2-compatible)](https://docs.conare.ai/ja/api-reference/models/rerank-documents-cohere-v2-compatible.md)


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