/v1 developer API, Square1 exposes a
second HTTP surface that manages the account itself — API keys, browser
sessions, your own usage metrics, password and passkeys, and BYOK
credentials.
This is the surface the Square1 dashboard talks to. It is documented here
because a handful of things (listing your keys, revoking a lost session,
pulling your own per-model metrics) have no /v1 equivalent.
Base URL
/v1 endpoints do
not live here, and these endpoints do not live on
inference.square1.dev — see Base URLs.
Authentication
Two credentials are accepted, and which ones work depends on the endpoint.Cookie session — ws-session
Signing in mints an HttpOnly, Secure, SameSite=Lax cookie named
ws-session, scoped to / with a 30-day lifetime. Every endpoint on this
page accepts it.
The sign-in routes that mint it (POST /api/auth/login,
POST /api/auth/passkey/verify, and the community-verification signup flow)
are outside the scope of this page.
Bearer API key — dual auth
Most/api/user/* endpoints also accept an ordinary API key:
/v1 surface uses. When you authenticate this way
there is no session row behind your request — which matters for
Sessions, where current is then false on every row.
BYOK management is the exception: /api/user/me/byok* accepts a Bearer
key too, but applies a stricter gate. See
BYOK management.
Cookie auth is not practical for unattended automation.
ws-session
is minted by a login form that sits behind a Cloudflare Turnstile
challenge when the operator has it enabled — there is no headless
credential exchange. If you are scripting, use a Bearer API key on the
dual-auth endpoints; reuse an existing browser session only for the
handful of endpoints that require the cookie.Account state
An account that isunlinked or revoked can still reach most of this
surface — that is deliberate, because self-recovery happens in the
dashboard. Two things are locked down anyway:
- Minting credentials (
POST /api/user/me/keys,POST /api/user/me/rotate-key) requiresactive, and answers403 account_unlinkedotherwise. - BYOK requires
activeas well.
suspended and retired accounts are rejected outright.
The two credentials are not exactly equivalent: a
revoked account can
still reach this surface with the cookie but not with a Bearer key.
active and unlinked work either way.Response envelopes
Most endpoints answer with:
Read for the field you want; don’t assume a wrapper.
Field naming
/api/user/*request bodies are mostly camelCase (currentPassword,profileUrl) — butPOST /api/user/sfwtakessfw_mode./api/user/me/byok*is entirely snake_case, request and response.GET /api/user/memixes both in one payload:profile,modelUsage, andtotalsare camelCase whiledisplay_id,today_self,recentRequests[]rows, and everything underplanare snake_case.GET /api/user/me/metricsis entirely snake_case.
Errors
Errors mostly use the same envelope as the/v1 surface:
/v1 errors:
codeis frequently absent. Many failures on this surface carry onlymessageandtype. Where acodeexists it is listed explicitly on each page — branch on it there, and fall back to the HTTP status everywhere else.- One endpoint returns a bare string.
GET /api/user/meanswers403with{"error": "User not found (legacy key)"}—erroris a string, not an object. If you unwraperror.messageblindly you will getundefinedhere.
message is Korean and is written for humans. Don’t parse it.
Rate limits
Only some paths carry an application-level window. Each is 60 seconds, fixed (not sliding), and counted per client IP — not per account.
Everything else under
/api/user/* — including the key list, key
creation/deletion, session management, passkeys, and GET /api/user/me —
has no application-level window. Edge limits still apply.
Rate-limit headers
Requests that pass through one of the windows above carry exactly two headers, on both accepted and rejected requests:POST /api/user/me/rotate-key enforces its own 60-second
cooldown instead of a window, and its 429 carries no code and no
Retry-After. Handle a bare 429 as retryable.
Browser access
Cross-origin browser access is not supported. These endpoints are served
for the Square1 web app’s own origin, and the custom response headers
above are not exposed to cross-origin JavaScript. If you need this data in
a page you host, proxy it through your backend with a Bearer key.
Pages
API keys
List, create, delete, reveal, and rotate your
sq-arca- keys.Sessions
See where you’re signed in and cut off a lost device.
Profile and usage
GET /api/user/me, your own metrics, and your recent requests.BYOK management
Register and verify your own provider credentials.
Password and passkeys
Change your password; manage WebAuthn credentials.