Skip to main content
Use this tutorial to make one successful Phaseo request and confirm where the response text appears. You will:
  • 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

  1. Open the Phaseo Dashboard.
  2. Create a key under Gateway -> Keys.
  3. Copy it once and store it securely.
Use this format:
Treat your API key like a password. Do not expose it in client-side code.

2. Send a text request

Use POST /v1/responses for the first request. It is the recommended endpoint for new text-generation work.

Request

Response

For direct Responses API calls, read the assistant reply from 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 and Authorization header.
  • 400: check the request body and model ID.
  • 402: switch to a :free model or add credits before using a paid model.
  • 429 or 5xx: retry with exponential backoff.
Use the Error Handling reference to debug quickly.

4. If you are building video

Video generation is async. Create a job first, then poll or subscribe for the result.
  1. Create a job with POST /v1/videos.
  2. Poll status with GET /v1/videos/{video_id} until completed.
  3. 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.
Last modified on July 26, 2026