Skip to main content
Use this page when you want one of three things:
  • a small copy-paste request example
  • a full sample project you can run locally
  • a walkthrough that shows how the sample is put together
Examples marked with :free do not require deposited credits.

1. Free-model text generation with /responses

curl https://api.phaseo.app/v1/responses \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemma-3-27b:free",
    "input": "Summarize this article in 3 bullet points."
  }'

2. Paid-model chat completion

curl https://api.phaseo.app/v1/chat/completions \
  -H "Authorization: Bearer $AI_STATS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.4",
    "messages": [{"role": "user", "content": "Write a short email."}]
  }'

3. Image generation

curl https://api.phaseo.app/v1/images/generations \
  -H "Authorization: Bearer $AI_STATS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1",
    "prompt": "A minimal line drawing of a lighthouse."
  }'

Full sample projects

These projects live in this repository under examples/. Each one also has a matching cookbook walkthrough.

Browser apps

Script and backend starters

Prompt-first project starters

If you want a coding agent to generate the first version for you, start here:

More SDK examples

Explore the SDK Reference for language-specific examples.
Last modified on May 19, 2026