Endpoints Reference
The documented, supported surface of the Nyquest API.
This is not an exhaustive list of what the backend serves. Some routes are internal, some are admin-only, and some are intentionally left out. If an endpoint is not listed here, it is not supported for external use — it can change or disappear without notice, and it is not covered by anything in these docs.
Unless an entry says otherwise, send Authorization: Bearer <token> — a JWT from the sign-in flow, or a personal API key. See Authentication.
Base URL: https://api.nyquest.ai
Public (/v1/...)
These endpoints are designed for external integration use.
Chat & models
| Method | Path | Purpose |
|---|
| POST | /v1/chat/completions | OpenAI-compatible chat completion. Accepts standard OpenAI body. See OpenAI Compatibility. |
| GET | /v1/models | List models you can call (OpenAI-compatible shape). |
Image generation
| Method | Path | Purpose |
|---|
| POST | /v1/image/generate | Generate image from prompt. Body: {prompt, model, aspect_ratio?, count?}. Supports Google Imagen 4 (imagen-4.0-*) tiers. |
| GET | /v1/image/models | List image-capable models in catalog. |
| POST | /v1/image/byok-models | List image models available via your BYOK key. |
| GET | /v1/image/gallery | Your previously-generated images. |
| DELETE | /v1/image/gallery | Delete entries from gallery. |
Audio generation (TTS)
| Method | Path | Purpose |
|---|
| POST | /v1/audio/generate | TTS from prompt. Body: {text, model, voice, tts_max_tokens?, ...}. tts_max_tokens defaults to 4096 (~3 min audio); supports 4096, 8192, 16384, or 32768. |
| GET | /v1/audio/models | List TTS models, incl. Google Gemini native-voice models (gemini-*-tts) with their voice lists. |
| POST | /v1/audio/byok-voices | List voices available via your BYOK key for a model. |
Music generation
| Method | Path | Purpose |
|---|
| POST | /v1/music/generate | Generate an instrumental clip (Google Lyria). Body: {prompt, model?}. Returns {audio_url, cost, ...}. |
| GET | /v1/music/models | List music models (Lyria clip / pro) with pricing. |
Video generation (async)
| Method | Path | Purpose |
|---|
| POST | /v1/video/generate | Submit a video job (Google Veo). Body: {prompt, model?, aspect_ratio?}. Returns 202 + {job_id, status}. Balance is held up front. |
| GET | /v1/video/jobs/{id} | Poll a job; returns {status, video_url, cost, ...}. States include submitting, pending, running, done, failed, and submission_unknown. Confirmed failures release the hold; an unknown submission outcome requires reconciliation before retrying. |
| GET | /v1/video/jobs | List your video jobs. |
| GET | /v1/video/models | List video models (Veo tiers) with pricing. |
Agent runs
| Method | Path | Purpose |
|---|
| POST | /v1/agents/run | Start a multi-step agent run. Body: {goal, project_id?, conversation_id?, max_steps?}. Returns SSE stream. |
| GET | /v1/agents/runs | List your past runs. |
| GET | /v1/agents/runs/{id} | Get run detail (final answer + timeline). |
| POST | /v1/agents/runs/{id}/stop | Soft-stop an in-flight run. |
Multi-Model Splicer
Splices are started from Splicer in the app (they stream over the same SSE channel as chat); these endpoints cover discovery and history. See Multi-Model Splicer.
| Method | Path | Purpose |
|---|
| GET | /v1/splicer/registry | Models available to splice for your tier, with limits. |
| GET | /v1/splicer/runs/{id} | Run detail: per-model responses, consensus verdict, costs, compression savings. |
Quotes (financial)
| Method | Path | Purpose |
|---|
| GET | /v1/quotes?symbols=AAPL,MSFT,SPX | Live equity / index / commodity / FX quotes via Stooq. 30s cache. You do not need a market-data key of your own. |
Live support sessions
| Method | Path | Purpose |
|---|
| POST | /v1/support/sessions | Open a Discord-bridged support session. |
| POST | /v1/support/sessions/{id}/messages | Send a user message in a session. |
| GET | /v1/support/sessions/{id}/stream | SSE stream of session events. |
| POST | /v1/support/sessions/{id}/close | Close a session. |
Anonymous BYOK (no auth)
Chat without an account by passing your own provider credentials per-request via X-Provider-* headers (e.g. X-Provider-Key, X-Provider-Url) on /v1/chat/completions. Keys are used in-flight and never persisted or logged. See Try Nyquest Without an Account.
| Method | Path | Purpose |
|---|
| POST | /byok/anon/test | Probe a provider key: confirms the key works against the upstream provider before you chat. No Bearer token required. |
Account & profile (/user/...)
These manage your personal data.
Account
| Method | Path | Purpose |
|---|
| GET | /user/me | Current user profile (id, email, tier, is_pro). |
| GET | /user/stats | Aggregate usage stats. |
| POST | /user/embed | Embed text (powers in-app semantic search). Body: {text}. |
Personal API keys (PATs)
| Method | Path | Purpose |
|---|
| POST | /user/api-keys | Create a PAT. Returns key once; save it. |
| GET | /user/api-keys | List your PATs (no secret returned). |
| DELETE | /user/api-keys/{id} | Delete a PAT. Stops working immediately. |
Conversations
| Method | Path | Purpose |
|---|
| GET | /user/conversations | List conversations. |
| GET | /user/conversations/{id} | Get conversation detail. |
| PATCH | /user/conversations/{id} | Update (e.g. assign to a project: {"project_id": "..."}). |
| DELETE | /user/conversations/{id} | Delete conversation. Permanent. |
Projects
| Method | Path | Purpose |
|---|
| GET | /user/projects | List your projects. |
| POST | /user/projects | Create a project. |
| GET | /user/projects/{id} | Get project detail. |
| PATCH | /user/projects/{id} | Update project. |
| DELETE | /user/projects/{id} | Delete project (un-projects its conversations + artifacts). |
| GET | /user/projects/{id}/conversations | List conversations in this project. |
BYOK Providers
| Method | Path | Purpose |
|---|
| GET | /user/providers | List your saved BYOK provider configs. |
| POST | /user/providers | Add a BYOK provider. Body: {name, provider_type, base_url, api_key}. |
| PUT | /user/providers/{id} | Update provider. |
| DELETE | /user/providers/{id} | Remove provider. |
| POST | /user/providers/{id}/test | Test the key against the upstream provider. |
| GET | /user/providers/{id}/models | List models reachable via that provider. |
Settings
| Method | Path | Purpose |
|---|
| GET | /user/settings | Read account-level settings (BYOK toggle, active provider, etc.). |
| PUT | /user/settings | Update settings. |
Billing (/billing/...)
| Method | Path | Purpose |
|---|
| GET | /billing/account | Wallet balance, is_pro, lifetime spend. |
| GET | /billing/ledger | Transaction history (credits + debits). |
| GET | /billing/usage | Token + cost usage by date range. |
| GET | /billing/portal | Returns a URL to Stripe customer portal (manage cards, etc.). |
| POST | /billing/add-credits | Returns a Stripe Checkout URL to fund the wallet. |
| POST | /billing/webhook | INBOUND from Stripe — not for client use. |
Auth (/auth/...)
These are mainly for the web UI sign-in flow. Scripts should use PATs instead.
| Method | Path | Purpose |
|---|
| POST | /auth/signup | Create account. |
| POST | /auth/login | Sign in, returns JWT. |
| POST | /auth/refresh | Refresh JWT. |
| POST | /auth/logout | Invalidate session client-side (JWT itself stays valid until expiry). |
| POST | /auth/forgot-password | Send reset email. |
| POST | /auth/reset-password | Use reset token + new password. |
| GET | /auth/oauth/google/start | Begin Google OAuth flow. |
| GET | /auth/oauth/google/callback | OAuth callback (browser-only). |
Health
| Method | Path | Purpose |
|---|
| GET | /health | Liveness probe, no auth. Returns {"status":"ok"} plus service name, version, and engine version. |
| GET | /ready | Readiness probe, no auth. Checks the database; returns ready or degraded, and 503 when the database is unreachable. |
| GET | /health/deep | Deep check across database, engine, and outbound email provider. Admin only — this one is not an open probe. |
/health/ready also responds. It is a separate handler rather than an alias for /ready: same job, different response body.
Admin (/admin/...)
Admin endpoints exist but require admin status, granted only by request. Not documented publicly. If you have admin and need details, reference src/admin/mod.rs in the backend or talk to a real human.
Where to next