- create an API key
- send one text request
- read the assistant output
- know what to check first if the request fails
1. Create an API key
- Open the Phaseo Dashboard.
- Create a key under Gateway -> Keys.
- Copy it once and store it securely.
Treat your API key like a password. Do not expose it in client-side code.
2. Send a text request
UsePOST /v1/responses for the first request. It is the recommended endpoint for new text-generation work.
Request
Response
output[].content[] where type is output_text.
If you use the Vercel AI SDK, read the reply from result.text.
3. Troubleshoot the first request
401: check the API key andAuthorizationheader.400: check the request body and model ID.402: switch to a:freemodel or add credits before using a paid model.429or5xx: retry with exponential backoff.
4. If you are building video
Video generation is async. Create a job first, then poll or subscribe for the result.- Create a job with
POST /v1/videos. - Poll status with
GET /v1/videos/{video_id}until completed. - Download content from
GET /v1/videos/{video_id}/content.
5. Keep building
Integrating with the Gateway
Production integration patterns and endpoint selection.
API Reference
Full request and response docs for every endpoint.
Examples
More complete request samples for common workflows.
Support
Get help with debugging, routing, and model behavior.