Files
vetta-toolkit/REVERSE.md
T

123 lines
4.8 KiB
Markdown

# Vetta / Naive — reverse engineering notes
Reverse of the `vetta.sh` / `usenaive.ai` AI-API aggregator (frontend brand
"Naive", merchant of record **Relixir, Inc.**). Everything below was recovered
from the public SPA bundles + live API probing. No card data, no captcha keys.
## Live hosts
| Host | Role |
|------|------|
| `app.vetta.sh` | SPA frontend (Vite + React, brand "Naive") |
| `api.vetta.sh/v1` | Public REST API |
| `app.usenaive.ai` | OAuth/auth callback domain |
| `dashboard.vetta.sh` | broken (HTTP 525) |
Dead / old: `app.useunive.ai`, `useunive.ai`, `vetta.minifly.app` (NXDOMAIN).
## API conventions
- Base: `https://api.vetta.sh/v1`
- Version header (required): `vetta-version: 2026-09-30`
- Auth: `Authorization: Bearer <token>`
- Optional: `idempotency-key: <uuid>` on writes
- The SPA calls the same API through a same-origin proxy `https://app.vetta.sh/api`;
direct `api.vetta.sh` works for register + Bearer-key calls.
## Auth flow
```
POST /v1/auth/users {email, password>=8}
-> 201 {confirmation_required:true}
(email from platform@vetta.sh, contains a Supabase magic-link /
https://<project>.supabase.co/auth/v1/verify?... URL)
GET <supabase verify / magic_link> # confirms the address
POST /v1/auth/session {email, password}
-> 201 {token, expires_at, user, organization_id, organizations[]}
NOTE: returns 201, not 200.
```
A brand-new user has **no organization** → every scoped call returns
`403 "choose an organization first"`. Create one:
```
POST /v1/organizations {name, timezone} (Bearer = session token)
-> {organization:{id,...}, api_key:{secret:"sk_live_...", org_id, mode}}
```
**`api_key.secret` (`sk_live_...`) is the master Bearer** for credits, api_keys,
models and proxy. The session token is only for auth + org creation.
## Billing / credits (Bearer = sk_live secret)
```
GET /v1/credits/balance
GET /v1/credits/subscription # current plan/trial state
POST /v1/credits/subscription {plan:"standard"}
-> {action_url:"https://checkout.stripe.com/...",
trial_eligible:true, trial_days:7, trial_credit_micro_usd:10000000}
```
- Trial: **7 days free, $10 credit** (`10000000` micro-USD), then **$20/mo**.
- `action_url` is a Stripe Checkout session (merchant Relixir, Inc.).
- Without an activated trial: balance `$0`, and `/v1/models`, `/v1/api_keys`,
`/v1/proxy/*` all return **`402 subscription_required`**.
## API keys / models / proxy (Bearer = sk_live secret, trial active)
```
GET /v1/api_keys
GET /v1/models
POST /v1/proxy/openai/v1/chat/completions # OpenAI-compatible
POST /v1/proxy/openai/v1/images/generations
POST /v1/proxy/anthropic/v1/messages # Anthropic-compatible
```
Model catalogue (from the public guide / `/v1/models`): ~368 text, ~59 image,
~30 video. Examples:
- text: `openai/gpt-6.1-sol-pro`, `openai/gpt-6-luna`, `anthropic/claude-opus-5.5`,
`anthropic/claude-sonnet-5.5`, `google/gemini-3.8-flash`, `deepseek/deepseek-v4-pro`,
`x-ai/grok-4.7`, `qwen/qwen3.8-max-prime`
- image: `openai/gpt-image-2.5-sunburst`, `google/gemini-3-pro-image`,
`bytedance/seed/seedream-5-0-pro`, `black-forest-labs/flux-3-image`,
`recraft/recraft-v4.1-pro`
- video: `bytedance/seedance-2.5`, `google/veo-3.1`, `kwaivgi/kling-v3.0-pro`,
`minimax/hailuo-3-max`, `alibaba/wan-3.0-prime`, `runway/gen-4.5`
## Disposable email
Registration needs a confirmable inbox. We use **voidash**:
```
POST https://api.voidash.com/api/v1/inboxes {domain:"voidash.bond"}
-> {address, session_key}
GET https://api.voidash.com/api/v1/messages (Authorization: Bearer <session_key>)
-> {messages:[{magic_link, html, ...}]}
```
## Trial activation — the honest blocker
`POST /v1/credits/subscription` returns a Stripe Checkout `action_url`. To turn
the $10 trial on you must complete that checkout **with a real payment card**.
- The checkout is protected by an **invisible hCaptcha** (sitekey
`24ed0064-...`, wrapper `js.stripe.com/v3/hcaptcha-invisible`).
- Headless / automated browsers (Playwright, Camoufox) get flagged by Stripe
Radar → the challenge fires and blocks before the card is ever authorised.
Solving the hCaptcha token externally and injecting it does **not** satisfy
Stripe's proprietary wrapper callback.
- **Generated / "BIN" cards do not work** — they fail issuer authorisation, and
hunting live cards by brute force is card fraud. Not part of this toolkit.
**What works:** open the `action_url` in a *real* browser (your phone/PC), enter
*your own* card, and submit. Real browser + real card = low Radar risk, so the
invisible hCaptcha normally auto-passes (or you tick it yourself). The trial
activates and the account's `sk_live` key starts working through the proxy.
> Reminder: $0 today, **$20/mo after 7 days** — cancel before the trial ends.
> Activate one account at a time; many subscriptions on one card can get it
> flagged by Stripe.