Skip to main content
This recipe is for teams building internal tools, CLIs, or coding-agent workflows on top of the gateway SDKs.
If you want a reusable starting point instead of writing every skill from scratch, install the public Phaseo skills from phaseoteam/skills:
npx skills add phaseoteam/skills --agent codex --skill '*'
Then keep project-specific instructions in your local SKILL.md.
The main idea is simple:
  • keep your SDK setup inside the repository
  • add a SKILL.md file that teaches the agent how the project expects requests to be made
  • point the agent at that file during setup so request patterns stay consistent

1. Install the SDK

If you’re using TypeScript or JavaScript:
npm install @phaseo/sdk
pnpm add @phaseo/sdk
yarn add @phaseo/sdk
bun add @phaseo/sdk
If you’re using Python:
pip install phaseo

2. Add a project-local skill file

Create SKILL.md in the repository root or the agent skill location your team uses.
# Phaseo Gateway

- Use `https://api.phaseo.ai/v1` as the gateway base URL.
- Read the API key from `PHASEO_API_KEY`.
- Prefer the Responses API for new text integrations.
- Use preset slugs when the repository defines shared request defaults.
- Log request ids and model ids for debugging.
- For async video jobs, store the returned id and poll status until terminal.

3. Keep the first integration tiny

For coding agents, smaller request helpers are easier to reuse than large wrappers.
import Phaseo from "@phaseo/sdk";

export const gateway = new Phaseo({
  apiKey: process.env.PHASEO_API_KEY!,
});
Then keep one obvious call path per surface:
  • text generation
  • async video
  • embeddings
  • image generation

4. What the skill should encode

Your SKILL.md should answer the questions that waste the most agent time:
  • which endpoint family to prefer
  • which environment variable holds credentials
  • which model ids or preset slugs are approved
  • how request ids should be logged
  • how async jobs should be tracked
  • SDK helper in one shared module
  • SKILL.md next to the integration code or at repository root
  • one short example per major endpoint
  • one note covering request logging and error handling
This gives both humans and coding agents the same operational entrypoint.
Last modified on July 9, 2026