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

# Measure Pricing and Performance

> Compare provider prices and operational Gateway performance without treating observational data as a controlled benchmark.

Use this guide to compare cost and speed across routes, understand the metrics Phaseo displays, and design a workload study before you move production traffic.

## Start with the decision

Choose the metric that matches the user experience you are protecting.

| Workload | Start with | Why |
| - | - | - |
| Chat, copilots, and voice | Gateway TTFT | Users notice how quickly useful output begins. |
| Long answers and code generation | Output speed | Sustained generation speed dominates longer responses. |
| Tools and structured workflows | Gateway E2E | Routing, retries, and orchestration affect the complete result. |
| Batch or offline work | Cost and effective throughput | A slower start may be acceptable when total throughput and spend matter more. |

No single score proves that a model is the best choice for every workload.

## Compare pricing

Provider price sheets use different units: per token, per million tokens, per image, per second, per minute, or per request. Phaseo keeps the underlying unit and normalizes comparable prices for catalog views and the pricing calculator.

For text models, compare input, cached input, cache write, reasoning, and output meters separately when they are present. For media models, keep the native billing unit visible; a per-second video price should not be presented as though it were a token price.

> [!NOTE]
>
> Catalog pricing is evidence for estimating a request, not a quote for every possible payload. Provider tiers, regional offers, batch pricing, cache behavior, and request-specific meters can change the final amount.

Use the [pricing calculator](https://phaseo.app/tools/pricing-calculator) for a representative payload, then confirm the charged amount in Gateway usage after a test request.

## Understand the performance metrics

Phaseo records operational timing for requests routed through the Gateway.

| Metric | Definition |
| - | - |
| **Gateway TTFT** | Gateway request start to the first content-bearing generated output. |
| **Provider TTFT** | Selected provider dispatch to the first content-bearing generated output. |
| **Provider duration** | Selected provider dispatch to the terminal response. |
| **Gateway E2E** | Gateway request start to completion. |
| **Phaseo overhead** | `max(0, Gateway E2E - provider duration)`. |
| **Effective throughput** | All output tokens divided by full provider duration. |
| **Output speed** | Output tokens after the first divided by provider time after TTFT. |
| **TPOT / ITL** | Request-level average time per token after the first output. |

TTFT, output speed, TPOT, and ITL require a streaming response with a content-bearing first output. Metadata-only stream frames do not count. Non-streaming responses can still contribute provider duration, Gateway E2E, and effective throughput without an invented TTFT.

Phaseo overhead isolates time outside the selected provider call. It can include Gateway processing, routing work, retries, and network effects. It is not a fixed platform constant and should be read as a distribution over a defined window.

## Read operational data correctly

Performance pages summarize live Gateway traffic. They are observational measurements, not controlled benchmark runs and not intrinsic properties of a model.

Results can move because of:

* provider and route selection
* Cloudflare execution location and network path
* provider queueing or regional load
* prompt and output length
* streaming versus non-streaming behavior
* retries, cancellations, and tool calls
* model or provider updates during the selected window

Public charts can expose percentiles such as P50, P90, P95, and P99. For latency, lower is better. For throughput, higher is better, so a lower throughput percentile describes the slow tail.

Always record the selected time window, route, region, sample filters, and percentile beside a result. Do not compare two screenshots with different windows as though they were the same study.

## Run a reproducible workload study

Use public telemetry to narrow the candidates, then validate the finalists with your own prompt mix.

1. Choose two or three routable models from the default `GET /v1/models` response.
2. Create a sanitized prompt set that represents short, typical, and long requests.
3. Fix the endpoint, region, streaming mode, provider constraints, and concurrency.
4. Run repeated requests for each prompt instead of relying on one sample.
5. Capture request ID, selected provider, success or error, output tokens, Gateway TTFT, provider duration, Gateway E2E, Phaseo overhead, and cost.
6. Compare distributions and failure modes, then keep the raw results with the test configuration.

Example result schema:

```json theme={null}
{
  "study_id": "support-summary-v1",
  "model": "<verified-model-id>",
  "endpoint": "responses",
  "stream": true,
  "region": "<execution-region>",
  "request_id": "req_...",
  "gateway_ttft_ms": 0,
  "provider_duration_ms": 0,
  "gateway_e2e_ms": 0,
  "phaseo_overhead_ms": 0,
  "output_tokens": 0,
  "cost_usd": 0,
  "status": "completed"
}
```

The zero values are placeholders. Publish measured values only with the workload definition, sample count, time window, and permission to disclose the data.

## What Phaseo does not claim

* Catalog presence does not mean a model is routable. Use the default active availability filter.
* Public operational telemetry does not guarantee future latency or uptime.
* A benchmark score does not establish production quality for your prompt mix.
* An illustrative UI profile is not a live model measurement.
* A customer quote, logo, or workload result should not be published without permission and supporting evidence.

## Next steps

> [card] [Check reliability and status](https://phaseo.app/docs/v1/developers/reliability-and-status.md)
>
> Check incidents, current model routability, metric definitions, and failure triage.

> [card] [Compare models](https://phaseo.app/compare)
>
> Compare pricing, metadata, and available performance signals side by side.

> [card] [Inspect model routes](https://phaseo.app/docs/v1/api-reference/endpoint/model-endpoints.md)
>
> Inspect provider routes, capabilities, availability state, and pricing for one model.

> [card] [Review benchmark methodology](https://phaseo.app/docs/v1/research/benchmark-methodology.md)
>
> Understand how benchmark sources and scores are normalized separately from Gateway telemetry.


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