Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt

Use this file to discover all available pages before exploring further.

Use this page when you want the smallest possible Node integration and you want to see every HTTP request clearly.

Build a Node REST smoke app against AI Stats using raw HTTP.

CursorOpen in Cursor

Sample project

What this app does

  • calls GET /v1/health
  • calls GET /v1/models
  • exercises generation routes like POST /v1/responses
  • gives you a raw HTTP reference for smoke tests, scripts, and backend checks

When this sample is the right fit

Start here when:
  • you want to debug raw API calls directly
  • you do not want SDK abstractions yet
  • you are building a script, worker, or CLI rather than a web UI

Run the sample

cd examples/gateway-node-quickstart
cp .env.example .env.local
Set:
  • AI_STATS_API_KEY
Then run either:
npm run smoke
or:
npm run start

What to look at in the code

  • how the script loads .env.local
  • how the authorization header is attached
  • how each request is built explicitly
  • how non-200 responses are surfaced instead of swallowed

How to make it your own

  • trim the script to only the routes your service actually needs
  • move shared request code into one helper if multiple scripts will use it
  • upgrade to the TypeScript SDK later if the raw HTTP path becomes repetitive
Last modified on May 19, 2026