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

# Mini App Starter Prompts

> Copyable prompts for coding agents to build small Phaseo apps with raw HTTP, SDKs, or agent runtimes.

Use this page when you want to hand a coding agent one concrete prompt that produces a small, working app shape instead of a vague integration plan.

> [!TIP]
>
> These prompts are written to be outcome-focused and implementation-specific so they work better in Cursor, Claude Code, Codex, and similar tools.

## How to use these prompts

**1. Pick the integration surface**

Choose the prompt that matches how you want the app to call Phaseo:

* raw HTTP
* one official SDK
* Vercel AI SDK
* Agent SDK

**2. Replace the bracketed variables**

Fill in values like `[APP IDEA]`, `[FRAMEWORK]`, `[MODEL]`, and `[LANGUAGE]` before you paste the prompt into your coding agent.

**3. Ask for verification, not just code**

Keep the verification lines in the prompt. They force the agent to report what it actually ran, what it assumed, and what still needs manual setup.

## Prompt packs

> [accordion] Raw HTTP mini app
>
> Build a small app that uses **raw HTTP** against Phaseo instead of an SDK.
>
> You are implementing a small production-style demo app with Phaseo Gateway.
>
> &#x20;     Build a \[FRAMEWORK] mini app for \[APP IDEA].
>
> &#x20;     Requirements:
> &#x20;     \- Use raw HTTP requests, not A Phaseo SDK.
> &#x20;     \- Use the Phaseo endpoint \[ENDPOINT].
> &#x20;     \- Use model \[MODEL].
> &#x20;     \- Read the API key from an environment variable named PHASEO\_API\_KEY.
> &#x20;     \- Keep the app intentionally small: one main page, one server route or handler, and minimal styling.
> &#x20;     \- Show the user input, the request submission state, the model output, and any gateway error state.
> &#x20;     \- Add one example request payload in comments or docs so the integration is easy to audit later.
>
> &#x20;     Implementation details:
> &#x20;     \- Use fetch.
> &#x20;     \- Keep the request body explicit instead of hiding fields behind abstractions.
> &#x20;     \- Add basic validation for empty input before making the API request.
> &#x20;     \- Handle non-200 responses cleanly and surface the response body when useful.
> &#x20;     \- Keep secrets server-side only.
>
> &#x20;     Deliverables:
> &#x20;     \- The app code.
> &#x20;     \- A short README section explaining how to run it.
> &#x20;     \- A .env.example entry for PHASEO\_API\_KEY.
>
> &#x20;     Verification:
> &#x20;     \- Run the local app if possible.
> &#x20;     \- Verify one successful request path.
> &#x20;     \- Report exactly what you verified, what you could not verify, and any remaining assumptions.

> [accordion] TypeScript SDK mini app
>
> Build a mini app on the **TypeScript SDK** with a small, inspectable integration.
>
> You are building a small app on top of the Phaseo TypeScript SDK.
>
> &#x20;     Create a \[FRAMEWORK] mini app for \[APP IDEA].
>
> &#x20;     Requirements:
> &#x20;     \- Use @phaseo/sdk.
> &#x20;     \- Use model \[MODEL].
> &#x20;     \- Prefer the responses API unless there is a strong reason to use another endpoint.
> &#x20;     \- Read the API key from PHASEO\_API\_KEY.
> &#x20;     \- Keep the code compact and understandable for a first integration.
> &#x20;     \- Show loading, success, and failure states in the UI.
>
> &#x20;     Implementation details:
> &#x20;     \- Use one server-side integration boundary instead of scattering SDK calls across many files.
> &#x20;     \- Keep the request shape explicit, including model, input, and any important options.
> &#x20;     \- Include one example of response parsing that extracts the final assistant text safely.
> &#x20;     \- Add minimal comments only where the SDK response shape would otherwise be unclear.
>
> &#x20;     Deliverables:
> &#x20;     \- Working app code.
> &#x20;     \- Short setup instructions.
> &#x20;     \- One short explanation of why the TypeScript SDK path is better than raw HTTP for this mini app.
>
> &#x20;     Verification:
> &#x20;     \- Run the app if possible.
> &#x20;     \- Exercise one end-to-end request.
> &#x20;     \- Report the exact files changed and any remaining setup the user must do.

> [accordion] Python SDK mini app
>
> Build a small Python app or service using the **official Python SDK**.
>
> You are implementing a small AI-powered Python app with Phaseo Gateway.
>
> &#x20;     Build a \[PYTHON FRAMEWORK OR APP TYPE] app for \[APP IDEA].
>
> &#x20;     Requirements:
> &#x20;     \- Use the official Python SDK phaseo.
> &#x20;     \- Use model \[MODEL].
> &#x20;     \- Read credentials from PHASEO\_API\_KEY.
> &#x20;     \- Keep the code small enough for a new team member to understand quickly.
> &#x20;     \- Include one user input path and one model output path.
> &#x20;     \- Include clean error handling for invalid input and upstream gateway failures.
>
> &#x20;     Implementation details:
> &#x20;     \- Prefer one integration module that owns the Phaseo client creation.
> &#x20;     \- Use the SDK response shape directly rather than wrapping it in unnecessary abstractions.
> &#x20;     \- If structured output is useful for the app, use it and validate the returned shape.
> &#x20;     \- Add a short README section with install and run steps.
>
> &#x20;     Deliverables:
> &#x20;     \- App code.
> &#x20;     \- Any dependency updates.
> &#x20;     \- Short usage instructions.
>
> &#x20;     Verification:
> &#x20;     \- Run the relevant command if possible.
> &#x20;     \- Verify one successful request path or explain why you could not.
> &#x20;     \- Call out any environment variables or local services the user still needs.

> [accordion] Vercel AI SDK mini app
>
> Build a small app using **Phaseo through the Vercel AI SDK**.
>
> You are building a mini app that uses Phaseo through the Vercel AI SDK provider.
>
> &#x20;     Create a \[FRAMEWORK] app for \[APP IDEA].
>
> &#x20;     Requirements:
> &#x20;     \- Use the Phaseo Vercel AI SDK provider.
> &#x20;     \- Use model \[MODEL].
> &#x20;     \- Read the Phaseo API key from PHASEO\_API\_KEY.
> &#x20;     \- Keep the UX lightweight and oriented around one clear user task.
> &#x20;     \- Support streamed output if the app is chat-like; otherwise explain why non-streaming is simpler here.
>
> &#x20;     Implementation details:
> &#x20;     \- Keep the provider wiring explicit.
> &#x20;     \- Use the AI SDK primitives in a standard, framework-appropriate way.
> &#x20;     \- Avoid unnecessary extra state management for the first version.
> &#x20;     \- Add one short explanation of how the provider model id is chosen.
>
> &#x20;     Deliverables:
> &#x20;     \- App code.
> &#x20;     \- Setup steps.
> &#x20;     \- A brief note on how to switch to a different model later.
>
> &#x20;     Verification:
> &#x20;     \- Run the app if possible.
> &#x20;     \- Verify the main user flow.
> &#x20;     \- Report any unverified parts separately.

> [accordion] Agent SDK mini app
>
> Build a small app with the **Phaseo Agent SDK** and one bounded tool loop.
>
> You are building a small agentic app on top of Phaseo Gateway.
>
> &#x20;     Create a \[LANGUAGE] mini app for \[APP IDEA] using the Phaseo Agent SDK.
>
> &#x20;     Requirements:
> &#x20;     \- Use the Phaseo Agent SDK for \[LANGUAGE].
> &#x20;     \- Use model \[MODEL].
> &#x20;     \- Include one or two deterministic local tools only.
> &#x20;     \- Keep the tool loop bounded and easy to debug.
> &#x20;     \- Read the API key from PHASEO\_API\_KEY.
> &#x20;     \- Show the final output and, where appropriate, the tool activity or intermediate reasoning state.
>
> &#x20;     Implementation details:
> &#x20;     \- Keep the agent definition in one place.
> &#x20;     \- Keep tool definitions small and deterministic.
> &#x20;     \- Avoid a giant general-purpose agent framework for the first version.
> &#x20;     \- Add a note about where run state would be persisted if the app later becomes resumable.
>
> &#x20;     Deliverables:
> &#x20;     \- App code.
> &#x20;     \- Setup instructions.
> &#x20;     \- A short explanation of why the Agent SDK is better than a one-shot completion for this workflow.
>
> &#x20;     Verification:
> &#x20;     \- Run the main path if possible.
> &#x20;     \- Verify one end-to-end agent run.
> &#x20;     \- Report any remaining assumptions, especially around environment setup or local tool dependencies.

## How to make the prompts work better

* Replace `[APP IDEA]` with one narrow user job, not a broad product pitch.
* Replace `[MODEL]` with the exact model id you want the agent to use.
* Say whether the output should be free text, strict JSON, chat, or one generated asset.
* Mention the UI framework and deployment target when you know them.
* Add one or two constraints that matter, such as `EU-only providers`, `use streaming`, or `keep all secrets server-side`.

## Related guides

* [Quickstart](https://phaseo.app/docs/v1/quickstart.md)
* [Examples](https://phaseo.app/docs/v1/guides/examples.md)
* [TypeScript SDK overview](https://phaseo.app/docs/v1/sdk-reference/typescript/overview.md)
* [Python SDK overview](https://phaseo.app/docs/v1/sdk-reference/python/overview.md)
* [Agent SDK overview](https://phaseo.app/docs/v1/sdk-reference/agent-sdk/overview.md)


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