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

> ## Agent Instructions
> Phaseo Gateway base URL: https://api.phaseo.app/v1. Send `Authorization: Bearer $PHASEO_API_KEY` with every request.
> Model IDs look like `provider/model`, for example `openai/gpt-6-astra`. Do not guess IDs: list them with `GET /v1/models` or check https://phaseo.app/models. `phaseo/free` routes to an available free model and needs no wallet balance.
> For new text integrations prefer `POST /v1/responses`. `POST /v1/chat/completions` (OpenAI format) and `POST /v1/messages` (Anthropic format) suit existing code.
> The full API contract is https://phaseo.app/docs/openapi/v1/openapi.yaml. Official SDKs: `@phaseo/sdk` (TypeScript) and `phaseo` (Python), plus Go, C#, PHP, Ruby and Rust.
> Search these docs over MCP at https://phaseo.app/docs/mcp, and install Phaseo skills with `npx skills add https://phaseo.app/docs`. If a page is wrong or out of date, report it with the MCP `submit_feedback` tool.
> Manage Phaseo accounts with the `phaseo` CLI (`npm install -g @phaseo/cli`, then `phaseo login` or `phaseo login --device-code`), the `/v1` Management API or the MCP server at `https://mcp.phaseo.app/mcp?access=manage`. Do not send users to the dashboard for account tasks. A person is still needed for sign-up, approving a sign-in, paying the first top-up on the checkout link that `phaseo credits add` returns when no card is saved, confirming each saved-card top-up from the emailed link, and account security (password, MFA, passkeys). Create API keys with `phaseo keys create --name <name> --json`; never guess one. Credit top-ups need `phaseo login --scopes billing:write` first. Task map: https://phaseo.app/docs/v1/developers/manage-from-an-agent.md.

# Phaseo の仕組み

> Phaseo と連携する前に、モデル、プロバイダー、ルーティング、課金を理解します。

モデル ID を Phaseo のエンドポイントに送ると、Phaseo はそのモデルをホストするプロバイダーにリクエストをルーティングします。モデルとエンドポイントはアプリケーションが選び、どのプロバイダーが処理できるかはワークスペースの設定とリクエストのルーティング制御が決めます。

```mermaid theme={null}
flowchart LR
  app["あなたのアプリ"] -->|"モデル + エンドポイント"| gw["Phaseo Gateway"]
  gw --> rules{{"ワークスペースの設定とリクエストのルーティング制御"}}
  rules --> p1["プロバイダー A"]
  rules -.->|"フォールバック"| p2["プロバイダー B"]
```

## モデルとプロバイダー

モデルは出力を生成するシステムです。プロバイダーはモデルをホストし、その提供状況、対応するパラメーター、価格、性能を決めます。1 つのモデルに複数のプロバイダーの提供がある場合もあります。

公開カタログには、まだ Gateway で利用できないモデルも掲載されています。リクエストで ID を使う前に、[モデルの提供状況](https://phaseo.app/docs/ja/v1/exploring/models.md)を確認してください。

## リクエストとルーティング

[Responses、Chat Completions、Messages](https://phaseo.app/docs/ja/v1/api-reference/introduction.md) のうち、アプリケーションのプロトコルに合うものを使います。エンドポイントが共通でも、すべてのモデルがすべてのパラメーターに対応しているわけではありません。プロバイダーの機能は依然として異なります。

[ルーティング制御](https://phaseo.app/docs/ja/v1/guides/routing-and-fallbacks.md)は、どのプロバイダーがリクエストを処理できるか、そしてどう順位付けされるかを制限します。フォールバックはこれらの制限の範囲内で行われ、利用可能な容量に左右されるため、成功を保証するものではありません。

## 課金とアクセス

マネージドのリクエストには Phaseo ワークスペースの残高が使われ、`:free` モデルはクレジットを入金しなくても動作します。独自のプロバイダー認証情報（BYOK）を使う場合は、プロバイダーの課金とアカウントの上限が適用されます。展開する前に[価格と課金](https://phaseo.app/docs/ja/v1/pricing/tiers.md)を確認してください。

[動画とバッチのジョブ](https://phaseo.app/docs/ja/v1/guides/async-video-and-batch.md)は、処理が終わる前にジョブを返します。これらはリクエストに応じてワークスペースごとに有効化されます（[機能の成熟度](https://phaseo.app/docs/ja/v1/developers/feature-maturity.md)を参照）。ステータスをポーリングするか Webhook を受け取り、その後で結果をダウンロードします。

## 次のステップ

[クイックスタート](https://phaseo.app/docs/ja/v1/quickstart.md)で最初のリクエストを送り、キーをバックエンドに置いたまま、アプリケーションに [Gateway を連携](https://phaseo.app/docs/ja/v1/developers/integrating-with-the-gateway.md)します。問題が起きたときの調べ方は[信頼性とステータス](https://phaseo.app/docs/ja/v1/developers/reliability-and-status.md)で、リクエストごとの使用量、レイテンシ、コスト、エラーは[リクエストのログ](https://phaseo.app/docs/ja/v1/guides/integrations/observability.md)で確認できます。


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