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

# Rust SDK

> Send Phaseo Gateway requests from Rust with the official phaseo crate.

Use the published [`phaseo`](https://crates.io/crates/phaseo) crate to call Phaseo Gateway from a Rust application.

The high-level client supports:

* Responses API requests with `Phaseo::responses(...)`
* Chat Completions requests with `Phaseo::chat_completions(...)`
* other JSON endpoints with `Phaseo::post(...)`
* live model route discovery with `Phaseo::model_endpoint_capabilities(...)`
* parameter support reports with `Phaseo::check_model_parameters(...)`
* environment-based configuration with `Phaseo::from_env()`
* custom HTTPS endpoints and loopback development servers
* structured status, JSON body, request ID, and error details

Parameter reports label each requested parameter as `supported`, `partial`, `unsupported`, or `unknown`, validate advertised values and ranges, and return the routes that accept the complete parameter set.

```rust theme={null}
use phaseo::Phaseo;
use serde_json::json;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Phaseo::from_env()?;
    let response = client.responses(&json!({
        "model": "openai/gpt-6-astra",
        "input": "Reply with exactly: Rust SDK works"
    }))?;

    println!("{}", response.body);
    Ok(())
}
```

> [!NOTE]
>
> Version `0.1` is supported and published, but its Rust API can still evolve before `1.0`. Pin a compatible minor version in production.

## Current scope

The ergonomic client is synchronous and accepts `serde_json::Value` request bodies. Generated low-level modules remain available under `phaseo::gen`, with convenience re-exports under `phaseo::client`, `phaseo::models`, and `phaseo::operations`.

The Rust client does not currently provide an async transport or a high-level streaming helper. Use the raw HTTP API when an application needs streaming before those helpers are added.

> [card] [Install the Rust SDK](https://phaseo.app/docs/v1/sdk-reference/rust/installation.md)
>
> Add the crate and configure your API key.

> [card] [Send requests](https://phaseo.app/docs/v1/sdk-reference/rust/usage.md)
>
> Call Responses, Chat Completions, and other JSON endpoints.

> [card] [Rust API reference](https://phaseo.app/docs/v1/sdk-reference/rust/api-reference.md)
>
> Review the exact public types and methods in `phaseo 0.1`.

> [card] [docs.rs](https://docs.rs/phaseo)
>
> Browse generated Rust API documentation.


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