REM Vibe Coder docs

Authentication

How calls to the REM Vibe Coder API are authenticated - the REM Auth session, CSRF, stream tickets, signed artifact links - plus roles and error codes.

REM Vibe Coder has no passwords and no API keys of its own. A person signs in with REM Auth (OpenID Connect, authorization code with PKCE S256, scopes openid email profile groups offline_access), and Vibe Coder keeps a server-side session for them.

The session

After sign-in the browser holds two cookies for remvibecoder.com:

Cookie

Use

vcn_sessionid

The session (HttpOnly, Secure)

vcn_csrftoken

The CSRF token; send its value in the X-CSRFToken header on every POST, PATCH, PUT and DELETE

A script running as you can use the same two values (copy them from your browser's developer tools; treat them like a password, they are valid until you sign out):

VC=https://remvibecoder.com/api/v1
curl -s "$VC/me" -H "Cookie: vcn_sessionid=$SID; vcn_csrftoken=$CSRF"
{"id": 3, "username": "you@example.com", "email": "you@example.com", "display_name": "Your Name", "role": "member", "is_active": true}

A write also needs the CSRF header and a same-site Referer:

curl -s -X POST "$VC/chats" \
  -H "Cookie: vcn_sessionid=$SID; vcn_csrftoken=$CSRF" \
  -H "X-CSRFToken: $CSRF" -H "Referer: https://remvibecoder.com/" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Build a habit tracker with streaks", "mode": "auto"}'

The session is re-checked against REM Auth every five minutes. If your REM account is switched off, signed out or loses access, the next call answers 401 and the session ends.

Credentials that may go in a URL

Your session never goes in a URL. Two short-lived, signed credentials exist for the places where a header cannot be sent:

What

Get it with

Valid

Bound to

Stream ticket for SSE

POST /runs/{id}/stream-ticket → {"ticket": "..."}, then GET /runs/{id}/stream?ticket=...

60 s to open

that run and you

Signed image link (test screenshots)

GET /artifacts/{id}/url → /api/v1/artifacts/{id}?sig=...

300 s

that artifact and you

Both are HMAC-signed and carry no secret of their own.

Roles

Role

From REM Auth

May

member

everyone allowed into Vibe Coder

own chats, projects, runs, memory, billing view

admin

group vibecoder-admins, or roles claim admin / vibecoder:admin

also /admin/* reports (people, chats, runs, telemetry, failures) and buying for the organisation

superadmin

groups vibecoder-superadmins or REM Super Admins, or roles claim superadmin

also settings, AI providers, lessons

An identity whose e-mail REM Auth has not verified is never more than a member.

Errors

Every error is JSON: {"code": "...", "detail": "..."}.

HTTP

code

When

400

bad_request

Malformed request (for example mode must be auto or plan)

401

—

No or ended session

402

out_of_credits

No Vibe Coder credits left

403

forbidden, billing_owner_only

Your role may not; only organisation admins buy

404

not_found

Missing, or not yours

409

conflict

For example answering a question that is no longer open

422

invalid_value, invalid_request

A field fails validation (detail lists them)

429

too_many_requests, too_many_streams

Slow down; too many live streams open

502

qch_unavailable

REM CloudHub did not answer

Download: PDF · Word · Markdown

Authentication | REM Vibe Coder · REM Vibe Coder