commit 007a619f414df2f8ade27457d021316c3f9c5396 Author: reform Date: Mon Nov 9 13:09:07 2026 +0300 speka autoreg + shim pool diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c746a6a --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bank.jsonl +sess.json +at.txt +pool_status.jsonl +__pycache__/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..0ff911d --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# speka-autoreg + +Авторег speka.me (Free: $1 расхода на модели в месяц, без карты, 10 rpm на ключ) + OpenAI-совместимый шим-пул для new-api/one-api. + +## Состав + +- `speka_farm.py N --workers W --start S` — регистрация: Supabase signup → cookie-сессия → `POST /api/keys` → `bank.jsonl` +- `speka_status.py -w 8` — логин по паролю → `usage_current_month` → `pool_live.jsonl` (cost < $1) +- `shim.py` — пул-шим на 127.0.0.1:8819: ротация ключей, dead на 401/403/402, 429 → cooldown, SSE passthrough, алиасы `speka-*` +- `patch_speka.py` — вставка алиасов в `sso_limits.py`, `toolgate.py`, `iishko/legacy.py` (rank_models) + +## Флоу + +1. `POST https://supabase-speka.srv1729373.hstgr.cloud/auth/v1/signup` с `apikey: ` → 200 + `access_token` (почта подтверждена сразу) +2. cookie `sb-supabase-speka-auth-token` = `base64-` + b64(session json) +3. `POST https://speka.me/api/keys` (cookie) → `key` = `sk-speka-live-…` (46 символов), лимит 1 активный ключ +4. `GET /v1/models` (Bearer) — проверка живости +5. расход: `GET /rest/v1/usage_current_month?select=cost_usd` с apikey + Bearer + +anon key берётся из бандла `/_next/static/chunks/30-*.js` → `anon.txt`. + +## Каталог (реальный) + +9 моделей: `meta/muse-glimmer-30b`, `nvidia/nemotron-3-ultra-550b-a55b`, `nvidia/nemotron-3.5-bolt-e4b`, `nvidia/nemotron-3.5-lightning-30b-a3b`, `poolside/laguna-xs-2.1`, `stepfun-ai/step-5-preview`, `meta/llama-3.2-90b-vision-instruct`, `nvidia/nemotron-3-embed-1b`, `black-forest-labs/flux.1-dev` (down). + +## Пруф прогона (09.11.26) + +200/200 аккаунтов OK, 200 уникальных ключей, суммарный лимит $200, e2e через прод new-api: 7/7 моделей 200, стрим ок. + +## Env + +- `SPEKA_BANK` (default `/opt/speka-shim/bank.jsonl`), `SPEKA_PORT` (8819), `SPEKA_UP` diff --git a/add_speka.sql b/add_speka.sql new file mode 100644 index 0000000..2890f39 --- /dev/null +++ b/add_speka.sql @@ -0,0 +1,15 @@ +insert into channels (type,key,status,name,weight,created_time,test_time,response_time,base_url,other,balance,balance_updated_time,models,"group",used_quota,model_mapping,status_code_mapping,priority,auto_ban,other_info,tag,setting,param_override,header_override) +select 1,'none',1,'speka-pool',0,extract(epoch from now())::bigint,0,0,'http://127.0.0.1:8819','',0,0, +'speka-muse-glimmer,speka-nemotron-ultra,speka-laguna-xs,speka-bolt,speka-lightning,speka-step5,speka-llama-vision', +'default,premium,t1,t2,t3,t4',0,'','{"400":429,"401":429,"402":429,"403":429}',50,0,'','speka','','','' +where not exists (select 1 from channels where name='speka-pool'); + +insert into abilities ("group",model,channel_id,enabled,priority,weight,tag) +select g.grp, m.model, c.id, true, c.priority, 0, c.tag +from channels c +cross join lateral unnest(string_to_array(c."group",',')) g(grp) +cross join lateral unnest(string_to_array(c.models,',')) m(model) +where c.name='speka-pool' and trim(m.model) <> '' +on conflict ("group",model,channel_id) do update set enabled=true; + +select id,name,status,base_url,priority,"group",tag,models from channels where name='speka-pool'; diff --git a/anon.txt b/anon.txt new file mode 100644 index 0000000..3d6915f --- /dev/null +++ b/anon.txt @@ -0,0 +1 @@ +eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzkzMzQ0NDQwLCJleHAiOjIxMDg3MDQ0NDB9.P-BpOpB-_BoR2YOKZuGpx9pqeK_wHwV24RWX4n2HOWQ \ No newline at end of file diff --git a/patch_speka.py b/patch_speka.py new file mode 100644 index 0000000..03213b5 --- /dev/null +++ b/patch_speka.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +"""Add speka-* aliases into sso_limits MODELS, toolgate ALLOW, legacy rank_models.""" +import re, shutil, time, sys + +MODELS = ['speka-muse-glimmer', 'speka-nemotron-ultra', 'speka-laguna-xs', + 'speka-bolt', 'speka-lightning', 'speka-step5', 'speka-llama-vision'] +ts = time.strftime('%Y%m%dT%H%M%S') +line_models = "MODELS += [m for m in %r if m not in MODELS] # [SPEKA %s]\n" % (MODELS, ts) +line_allow = "ALLOW += [m for m in %r if m not in ALLOW] # [SPEKA %s]\n" % (MODELS, ts) +line_rank = " models += [m for m in %r if m not in models] # [SPEKA %s]\n" % (MODELS, ts) + + +def patch(path, line, marker='# [SPEKA'): + src = open(path, encoding='utf-8').read() + if marker in src: + print('SKIP already', path) + return False + shutil.copy2(path, path + '.bak-speka-' + ts) + src = src.rstrip('\n') + '\n' + line + compile(src, path, 'exec') + open(path, 'w', encoding='utf-8').write(src) + print('PATCHED', path) + return True + + +patch('/root/sso_limits.py', line_models) +patch('/root/toolgate.py', line_allow) +patch('/opt/grok-bot/iishko/legacy.py', line_rank) \ No newline at end of file diff --git a/pool_live.jsonl b/pool_live.jsonl new file mode 100644 index 0000000..53e2422 --- /dev/null +++ b/pool_live.jsonl @@ -0,0 +1,200 @@ +{"email": "baradok609+spk015k17@gmail.com", "key": "sk-speka-live-CsfWHgcxD9ogPAd0PcIp1V5ptVaB6kYy", "ok": true, "cost": 6e-05, "left": 0.9999} +{"email": "baradok609+spk016c03@gmail.com", "key": "sk-speka-live-TNLOAuzb80plkc6EEEk5l1mN5pOd-kBf", "ok": true, "cost": 7.3e-05, "left": 0.9999} +{"email": "baradok609+spk01271b@gmail.com", "key": "sk-speka-live-Z3iYLgysmBSGW9ib-SuXWrCAYlshjuuY", "ok": true, "cost": 1.3e-05, "left": 1.0} +{"email": "baradok609+spk017hiq@gmail.com", "key": "sk-speka-live-XZw-7ifSxN2ERGMDAjEKMFtFZOnUr7WM", "ok": true, "cost": 4.7e-05, "left": 1.0} +{"email": "baradok609+spk010j3t@gmail.com", "key": "sk-speka-live-Jgx9vCR4y_50ju1LSNUnRDa7jDGHxMN7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk0118hj@gmail.com", "key": "sk-speka-live-YESpXetCqPAZ0k45ZnYx6sNXVkAsuSS_", "ok": true, "cost": 4.5e-05, "left": 1.0} +{"email": "baradok609+spk013tz1@gmail.com", "key": "sk-speka-live-X5xZk_TwyHRc9cBIEcyEpgiZydnqu8vZ", "ok": true, "cost": 1.8e-05, "left": 1.0} +{"email": "baradok609+spk014s9s@gmail.com", "key": "sk-speka-live-sVDBZPVO4V8BRTjM-Chfos_oifWrIFrI", "ok": true, "cost": 3.9e-05, "left": 1.0} +{"email": "baradok609+spk1048ul@gmail.com", "key": "sk-speka-live-UIRwr6tqiCh9hIYurlVnD8aglbEYZeIP", "ok": true, "cost": 6e-06, "left": 1.0} +{"email": "baradok609+spk102d9l@gmail.com", "key": "sk-speka-live-PLha1bu0VaLjAb-E2aTqYEkNZa5ztKeV", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk100rbo@gmail.com", "key": "sk-speka-live-NDmbMR_9PBT36dzzMFoXrUNMGroBxb3O", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk018f1i@gmail.com", "key": "sk-speka-live-1X_aRre9wUZfWTZizkZQDRH1rhv93t9i", "ok": true, "cost": 1.4e-05, "left": 1.0} +{"email": "baradok609+spk019rjn@gmail.com", "key": "sk-speka-live-mk7s5LMzf92pcra9wDYjaIZv--G2yBg4", "ok": true, "cost": 2.9e-05, "left": 1.0} +{"email": "baradok609+spk1031u2@gmail.com", "key": "sk-speka-live-hZnvaFjqdAlYdymQBqxFcxVDjxgu6pTT", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk105wz4@gmail.com", "key": "sk-speka-live-5HiBFl7J1qN59xglb8iWvHnZ7OHVAdYq", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk101cs2@gmail.com", "key": "sk-speka-live-JpUl6yd99JpgazqiGq8lU8CrMvRrC0Z-", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk107gct@gmail.com", "key": "sk-speka-live-uV9urzoiLzhTLukuu_laqdSh6_VNZL0s", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk115e5c@gmail.com", "key": "sk-speka-live-Ko7JO7MbYlofXxpYEAtvgzyKnOddbL_9", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk117tgv@gmail.com", "key": "sk-speka-live-CAnbZpti1_odSIKYL1pFRSCDU4Z1byxT", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk109nok@gmail.com", "key": "sk-speka-live-kpKDhOv_CfOfUyvqnoac-_gihqSDt0KV", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk111jxy@gmail.com", "key": "sk-speka-live-Q725GFwautVN_fWpVYK5gJs_RVfn6fY-", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk108pcv@gmail.com", "key": "sk-speka-live-PPIU3l3T1iySFpqEsztvwWrtJ5JkS0pH", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1101gr@gmail.com", "key": "sk-speka-live-zz2D-gdHNW49fjoLCDHdCBjAF0HQunEU", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk106qan@gmail.com", "key": "sk-speka-live-4LBtBDMbcn3yZZI1xP_tjcu47WWeSatp", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1236bg@gmail.com", "key": "sk-speka-live-RpSG59SP4M8DTnrnGsICJa0CAN5dg4Vj", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk118kk8@gmail.com", "key": "sk-speka-live-1tkGgBbp6g8JT99L5l1GnSwb8qDKA1Ku", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk119bjc@gmail.com", "key": "sk-speka-live-4g_R0D35Fvwaun8c8NVySv6_Ygl8Mu2M", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk112pm8@gmail.com", "key": "sk-speka-live-oID4yjqEk2f-598w6SnlgNUddmLusSm7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk113iw2@gmail.com", "key": "sk-speka-live-pQkYbfwcxd4PztJl-NzcOigCwRbdyFke", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk114k6t@gmail.com", "key": "sk-speka-live-XcyNaONQR1dEJ3GB1qAKcxwLZDJBC53x", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk121jsm@gmail.com", "key": "sk-speka-live-Np4wEvEPNTYaaM-k2wiDrixKU6nyBnEH", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk116loi@gmail.com", "key": "sk-speka-live-Z58OuGW_GbmhzorBRAfQnD2_AP6rDrX4", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk125ks6@gmail.com", "key": "sk-speka-live-j3_YsCfLX2I281i2O5re9SLn9MIK8XEC", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk128jan@gmail.com", "key": "sk-speka-live-ztlT8qU6PZ6vuOV3G-azprrbTGrIlzi9", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk126qj9@gmail.com", "key": "sk-speka-live-gZPJRbsvG9Kl-OcCdYFzOw3sVFuRxADX", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1206p7@gmail.com", "key": "sk-speka-live-40mbpihfCCoWMReTAPk7W01U6vsUN935", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk129ep1@gmail.com", "key": "sk-speka-live-s13x5Kam4Ao23i8_alVecKDJABWIZSLU", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk122uvb@gmail.com", "key": "sk-speka-live-lvVes-zsKlopouqrcnnl6yZLG1NUde73", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk124a84@gmail.com", "key": "sk-speka-live-Juw0diRcgk2hA7OGuCk-SFNy0V306cxv", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk127ts0@gmail.com", "key": "sk-speka-live-7LWzc5uavbGO_P4evY1BfcAgX0dZkOu7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk132smi@gmail.com", "key": "sk-speka-live-13dRIX9Sa9ixg4zGoQpiCxK_DJsxwdyf", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk141d5k@gmail.com", "key": "sk-speka-live-LzAH0AaTPWHwK1q4on4tVF248QBlJD9D", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk139yih@gmail.com", "key": "sk-speka-live-sMAnD0dN-hKKhGtR-uqr17tIDR2Y1hnD", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk133jcm@gmail.com", "key": "sk-speka-live-CkNxXiWz3_7Ik_RoxAj4Q2AdBvmXjRai", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk130k9h@gmail.com", "key": "sk-speka-live-FUAPikCX3vvnsbXsUBWqjeplrmuUaUnN", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk135nhz@gmail.com", "key": "sk-speka-live-Gp1RT-lTmx7gFDO6Be46jDGzFmvJaNY-", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk131h4q@gmail.com", "key": "sk-speka-live-DOQDihYoljgpVt1Y-L-UHuUTTMsANpo1", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk134yhe@gmail.com", "key": "sk-speka-live-oB22jLkAvCx3X41vDgrA6EXb2jTs5EzP", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk145cqz@gmail.com", "key": "sk-speka-live-1bZnf1AozfVU9HEVassnjnvU4BsSeN_f", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk142z3s@gmail.com", "key": "sk-speka-live-gZ4unSonKNdpnqMGzAHljbE6P5OFNE7J", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1439ph@gmail.com", "key": "sk-speka-live-s_8QwhSC9Obc5PMw6A_RjEdEecB7jMFW", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1368pe@gmail.com", "key": "sk-speka-live-9OB25FGxC91xb1yJ-JyJ5BZ6oxHqDji1", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk140wu8@gmail.com", "key": "sk-speka-live-TshFRcc7kwQpVjsaU-YptnUBna6rBAp8", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk137yf0@gmail.com", "key": "sk-speka-live-B0PCzZ35H5jxmpqD6oDZSp5GWvZ9PJ9A", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1387jn@gmail.com", "key": "sk-speka-live-dwWAtmdmVnFXksxcrKcmQQ9q_xS0iIFL", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk147uze@gmail.com", "key": "sk-speka-live-Btom-TJGtFkUTw2vj3h3cbRu6QDrBGX1", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk149z5i@gmail.com", "key": "sk-speka-live-0DWh7yYjPDWfAN95z00ZiNYqPgfwBxS7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1528ne@gmail.com", "key": "sk-speka-live-ytQKkLyY0ZxSfaAbVaR0bdjmUX86sNty", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk150r76@gmail.com", "key": "sk-speka-live-MOk5gaHU41y9DlL2S1X3msJyejP_0par", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1465v9@gmail.com", "key": "sk-speka-live-D9hnbvv3_aFwQ04tL_4ZPFQVp0YV1L24", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk153hom@gmail.com", "key": "sk-speka-live-rZ_Psu2aiG47_809iMLoTdKWsz_OprIw", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1445gx@gmail.com", "key": "sk-speka-live-Nws5IL0M-VPHf9-x4x3hYtKMukZqXkW_", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk151klp@gmail.com", "key": "sk-speka-live-EEZYcMBd5ByeDkB4UY39tax1BFr1V9Jt", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk148b0l@gmail.com", "key": "sk-speka-live-dZ3JVY15Ak9b-kYsLsU9zI4bjQJngNTV", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk156lak@gmail.com", "key": "sk-speka-live-JCIs9P1sbN21MeJZGe3kEt4toopcPWvW", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk163fud@gmail.com", "key": "sk-speka-live-b2lJnFG2Ea_dcMLmEbPFtKtK-XmcX_1G", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk165f7t@gmail.com", "key": "sk-speka-live-wgGg2ij0snYC545RaosLCnLgEG87-A-_", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk159x2p@gmail.com", "key": "sk-speka-live-Ra-6xBy_JI82nRv8mUZ6W44oLnOWHogS", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk154oah@gmail.com", "key": "sk-speka-live-X5OqRQAirBiP8pJucf6jAgNPk5BTKlOS", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1574xw@gmail.com", "key": "sk-speka-live-VHwDwkMbgssfG3K2Uf4rF3OaEN1NpLGo", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk155zc5@gmail.com", "key": "sk-speka-live-x0hWNlJmbGrUTjJqCL_93L0y0ugOdtUz", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk158tpb@gmail.com", "key": "sk-speka-live-pi1bOT10_QbqHJbAZ0wtqFxo6MMCwljg", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk169hco@gmail.com", "key": "sk-speka-live-5yrfqqlAY4DcJvjqofDNSbyDlfAdlUQ9", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1663li@gmail.com", "key": "sk-speka-live-BtpLlapqP_idzENylEpE8F0K5RDnQ21x", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk167c8s@gmail.com", "key": "sk-speka-live-FLmNHaly-fJuXmSZ-BXNNZgyS6ggpWfh", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk160chl@gmail.com", "key": "sk-speka-live-f_x_emDyrgmoHBCH2DE-19uXKQ3qTsim", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk164a6a@gmail.com", "key": "sk-speka-live-GvhwwXp2yT0xsF_obql85dfNRQAWUzKP", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk161qvf@gmail.com", "key": "sk-speka-live-xa29iBdV6GW68N6pjzbDCzWZ5Gh-J5J7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk162t1k@gmail.com", "key": "sk-speka-live-en49CvqyNSyp20ds_ijXBGiHHw4oiFVD", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk171gwc@gmail.com", "key": "sk-speka-live-iw98nlILWHsy_wQMH3q2oHXtmuCpM4Aa", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1725fg@gmail.com", "key": "sk-speka-live-0qzRaAaPwpkoAvbL9wizFZUxI_EvKBzv", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk174ie7@gmail.com", "key": "sk-speka-live-BUOS6FB-PoXRvn2A9p5RYpVauE0mnF5I", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk176bzx@gmail.com", "key": "sk-speka-live-6aa30muPuu6PDaUni1F5rZ3KNB92WDb5", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk168w4q@gmail.com", "key": "sk-speka-live-sXQ-19Kt-W1WDs7gtxf_Piss4czCOSA3", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk177j4f@gmail.com", "key": "sk-speka-live-WV7fE1RLTJ0-NNnKd0nHdeGIuW0NnuL_", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk170gz8@gmail.com", "key": "sk-speka-live-oCt6RHeJwfcbk3Q-CNyXphh2AH7vZ_TE", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk175yv8@gmail.com", "key": "sk-speka-live-KEwOR5SefeA6ZlNHfw8gi51TW5fWGUZV", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk173je5@gmail.com", "key": "sk-speka-live-fdefvCZesvqAMXeoCDrhZAPnj1YuA_VN", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk180564@gmail.com", "key": "sk-speka-live-46fRwyPICAmfCwwnV1Nzcnfdh4mUBVE7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk189ldx@gmail.com", "key": "sk-speka-live-ejtL_muIf_Lh9WI2NXigbn1azFUEr6A6", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1839f4@gmail.com", "key": "sk-speka-live-Tp5DbhpZSIpQ-c1iST8ysRK_1Z0u2qeS", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1850jp@gmail.com", "key": "sk-speka-live-pg7jgKi31IpYt12dPy8c2oXgW4yJJIpg", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk178nvo@gmail.com", "key": "sk-speka-live-pnSJf-JLyslByf-yOKyCb_FAK6gyILrD", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk179wdj@gmail.com", "key": "sk-speka-live-hLoI_H64aW7Zv5sJT1xIEzJ4DfGPmEzs", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1813do@gmail.com", "key": "sk-speka-live-A_qt8wWAUbSsgYbGdt0KM3Krq_TiaUng", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk182sg0@gmail.com", "key": "sk-speka-live-LAGsJChasKVKaIjqcWSg_1DbUnI_zGF8", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk191osl@gmail.com", "key": "sk-speka-live-przZENPa67mmKiRXhbsZoNH1aA9-BN7-", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1904h2@gmail.com", "key": "sk-speka-live-Ch9EEBXRD-e6aMSSbx_OkzhybzCVSe7q", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk184g9u@gmail.com", "key": "sk-speka-live-NscFIPfeRwDgMd8rV4I0PWN2e8f882Rg", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk193n1p@gmail.com", "key": "sk-speka-live-EjSwbQfTMS8ZW16HnGZ7_njv-Tn4wRDR", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk186iw3@gmail.com", "key": "sk-speka-live-vkovwgcC2hm9zhgCyv2fIB4tuBoV_IBq", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk187168@gmail.com", "key": "sk-speka-live-R5XggS6gSNxbSlxrEWZ2rS4QyTCo-gOi", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk188azs@gmail.com", "key": "sk-speka-live-N3OyxHmISnT-ugmooGjEU6dw7SmlAE19", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk195iqj@gmail.com", "key": "sk-speka-live-NZbCryidZTze-BhseVwJxpzOMjBKQOaW", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk199ff1@gmail.com", "key": "sk-speka-live-L_zPvB3trtRlRpqT9N4poWWatjQ6Vqjf", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk200q2c@gmail.com", "key": "sk-speka-live-7VN7RmF3GapNqPqRAV8vm1HJGZ1XTfxV", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk194mcw@gmail.com", "key": "sk-speka-live-R9VUc3-CtF8OtXDGTBsZpRUFF84XcvDm", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk198a6d@gmail.com", "key": "sk-speka-live-4e2gt4C-oPI7sVNJ0Y6ejhwFJb9W4xhr", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk1923mq@gmail.com", "key": "sk-speka-live-hmcnIIbfmqlRB79QCpb7EyCpAv4OELYT", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk201n3c@gmail.com", "key": "sk-speka-live-CCScTFb1UIS0wN6owPeHwbY66_U8C4iU", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk197mc5@gmail.com", "key": "sk-speka-live-ZfkDf3EwJNHX6Dddl_DJTHUgOUOabjWE", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2046hx@gmail.com", "key": "sk-speka-live-Fneq3JYoqeYW9wlUjrwMPRoGw5tYhoYP", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk213e1g@gmail.com", "key": "sk-speka-live-PngwF34R6pDu_WcAwkdoRm6ZDAJunkTF", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk196a71@gmail.com", "key": "sk-speka-live-iajtU0v1XdpC1f8vkkkEgTW1XcEG2EVM", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk207nqg@gmail.com", "key": "sk-speka-live-IBaIoBpA8HBpLxCNopHuwW1D3PgT9mxI", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk209gnn@gmail.com", "key": "sk-speka-live-Wm83cmozbAy7BbDUuq6sJHrAUHRtlSk-", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk203u4h@gmail.com", "key": "sk-speka-live-3Mn72kVs3VM-77744o6tPtLRcnKMlCf8", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk202c4m@gmail.com", "key": "sk-speka-live-SH9Wq_y78cEa_YXl8GBX3b-zTV6g-MuF", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2059pc@gmail.com", "key": "sk-speka-live-NKUClS-D_H4_Vz3SuwHgqKW3zyLOjkJb", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk215idu@gmail.com", "key": "sk-speka-live-zfzINRMHBW0OHbZB006hXgbs68xPcAfZ", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk214x3o@gmail.com", "key": "sk-speka-live-Hk2wOBpcTh4SC9eeYCt47nQ-cXvUszdm", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2089uh@gmail.com", "key": "sk-speka-live-zgu7-q9NBZov9xECHW-rI7nmLqzukVyk", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk206lmd@gmail.com", "key": "sk-speka-live-tX1GdyywRSiQy99xMWw1g_oVkAH0tkmt", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk217o8w@gmail.com", "key": "sk-speka-live-KtYaNYOqPgglahcQCxvIlJbnwcr2RIz2", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2112zi@gmail.com", "key": "sk-speka-live-xV3C68hBUCT-9fwQygQIb_fW8p8KmmND", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2124je@gmail.com", "key": "sk-speka-live-foObtqFmNxcOH9-mBVkJLref-h2z-Zcy", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk210i83@gmail.com", "key": "sk-speka-live-7krF6qL1f3ay4SJOVwtWQ_vuZ_XyxaB2", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk223q43@gmail.com", "key": "sk-speka-live-DrBVklvJZZz9__JyVB5dbkyWcAe6SoMp", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk224urs@gmail.com", "key": "sk-speka-live-Wwaeyr7WvsEU5hrhXKzBAAGkZbggi09B", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2188nh@gmail.com", "key": "sk-speka-live-L_Hw8FAEp2Dm0TqWemGuV-exFo-4aDL0", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk219p5h@gmail.com", "key": "sk-speka-live-sDl6GV4dD7YjrMUcqcrYx-LxN82SMXow", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk222cno@gmail.com", "key": "sk-speka-live-B-nnsgCXhe1vedsaiQrrSumrVSzl5ep4", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk225ilo@gmail.com", "key": "sk-speka-live-fYtH4GVOQK3pOr9qRgaanIAmDqMDPm-O", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk216h1s@gmail.com", "key": "sk-speka-live-slLfXatTyOKFSQYj8kjUDz6B9A2fvIHf", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk22171e@gmail.com", "key": "sk-speka-live-Tj3EFzaU0dro-Adro0tEAyn0YBO4V-Us", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk228af4@gmail.com", "key": "sk-speka-live-sjCeuXYPTcJPWGnqma3sMp7RgX1wffV8", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2373ma@gmail.com", "key": "sk-speka-live-GyQwboKRZx-S62JzBFkRExJJ5zwsXq50", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk231snv@gmail.com", "key": "sk-speka-live-06LvhDdBr4YV12Sj607eIMDkqnLpawI3", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2202tp@gmail.com", "key": "sk-speka-live-vfFBmK2NlaT4A-PB25NmW84t87YkooD6", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk233eab@gmail.com", "key": "sk-speka-live-2KTXxsg3_dqEdBolVb4DW_eN6FKeXeyk", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk227yco@gmail.com", "key": "sk-speka-live-1rBHCOun0RNdA5H2KXRcwBIxe4qXb4A0", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk226eww@gmail.com", "key": "sk-speka-live-XmcpTV4olefITrwVTyaoGu4HXOWwYOlP", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2293zj@gmail.com", "key": "sk-speka-live-1t-ZFpr-NhMsUJDf1l3rbMDW3BE2Nguo", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk239kok@gmail.com", "key": "sk-speka-live-w5x9a_DFIkNIcbLHMxs41lTR8amyPE8O", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk238ns7@gmail.com", "key": "sk-speka-live-Eu87U2qrE7ykd9fX8Mp_NdknqDoYNbf7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk232aeg@gmail.com", "key": "sk-speka-live-mLdg5zoy-Noc6DTJ-rC8KcoqY-ikHDnU", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk230wl1@gmail.com", "key": "sk-speka-live-sUeijwmWT3P7ib6kCdimyvMojaC1h8pX", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk241kdz@gmail.com", "key": "sk-speka-live-aTS0p0sRyb_au_lCfa5PhzqBc0cSk_77", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk235bqh@gmail.com", "key": "sk-speka-live-NMO3zwfaIskMqDEQ5oLUg2oXQLMIiFtN", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk236qm0@gmail.com", "key": "sk-speka-live-GUdva9oznZ1qIQk-YvIUSZrU05WN4SAJ", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk234yfi@gmail.com", "key": "sk-speka-live-yUp9IAxYMiC1ddBv7pBM8m9ryHnY8ksK", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk247jrw@gmail.com", "key": "sk-speka-live-nGadLOfEBIcKZN1DmTEghqJjFMi53wYH", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk248t6s@gmail.com", "key": "sk-speka-live-FEixJepCMdgourCAL4aR_KWvKwLMeDcM", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk242m8z@gmail.com", "key": "sk-speka-live-OfXPvvPaH0s6_CA3EkwtPUXa7WwnDHQB", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk243oek@gmail.com", "key": "sk-speka-live-GPayWbO2KGdyuWSs6XrI6Kq1cZ0X7JAS", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2460zt@gmail.com", "key": "sk-speka-live-gMQ0EWrEzbq7EklW02ncXxpiNQZG6qMQ", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk240ud8@gmail.com", "key": "sk-speka-live-c9ACnRH8ssX_eMw89xHjACCjap_dDgMM", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk249mto@gmail.com", "key": "sk-speka-live-M0qoTW9RaFyCFBOJb-02LLWz6Wuz7Dpk", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk245pc4@gmail.com", "key": "sk-speka-live-xKVdq8T5CKUHagudXU9Pk5zlvBjPCyaO", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk261hdq@gmail.com", "key": "sk-speka-live-VpgFoR4BUj5lx7PRS5G_ba_ohuOHDosg", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk254drg@gmail.com", "key": "sk-speka-live-ZSQvMlJvxTSp4caHtfV_9kYD3Jp_9Eaa", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk255c3h@gmail.com", "key": "sk-speka-live-pHqP7-CdCNnhLwr9WwVozSqq0DEqkYy7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk244bbg@gmail.com", "key": "sk-speka-live-_oZQJQAPdnjUGjeLom8MWkRYVIFebytF", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2562kr@gmail.com", "key": "sk-speka-live-8DO9ML8kOHCXEuG21EuEbiQoZ7s7Ks3D", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk253ruk@gmail.com", "key": "sk-speka-live-zZSlsPbOWV8xN6P_UJbSgGr4nifC2uej", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk250pa9@gmail.com", "key": "sk-speka-live-XeySU8JvIayyhJI8qwgMBgPS2GUzrLWX", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk251761@gmail.com", "key": "sk-speka-live-L_Mprx-7tGDzYJZtUcmdsIM64AZ2Jd52", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk260spu@gmail.com", "key": "sk-speka-live-0B1R83eKmsEoGBxkStoV9b5OTq5IPwpL", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2637nr@gmail.com", "key": "sk-speka-live-FC63_h3ZGSTZmV3cPl1VMngBu5bUPbD5", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk259imo@gmail.com", "key": "sk-speka-live-AVvva-V0Wn8oPd7JHJ1C6Wr3miMY0KcV", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2529wi@gmail.com", "key": "sk-speka-live-SputbUc5wBXzlWd0d79mA-yRvYoiON5H", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk264qv9@gmail.com", "key": "sk-speka-live-QZQoXlU8G9z9dCcXRu_uFzV1Ov3iqWfl", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk258vxs@gmail.com", "key": "sk-speka-live-PMn8zBl4Q4xRshoTYjYDWK0dXy0rnWVB", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk257kfa@gmail.com", "key": "sk-speka-live-1gxTqwfR2ITyxIC17b5UfbtoEueT047h", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk267etz@gmail.com", "key": "sk-speka-live-eMgZ-fKbSIdblJVfFfTzt-hs7li6jcrJ", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk269as5@gmail.com", "key": "sk-speka-live-6GU5xb7n75gKRmiooYVA8wmvh6MZ_S06", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2711xz@gmail.com", "key": "sk-speka-live-8Vm1LNpSlKeegHsqwSQdQt4ehI84i1Ni", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk266ln2@gmail.com", "key": "sk-speka-live-_10UgfPtjDhrephVdGQLuTVN74BxJbXy", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk262gfx@gmail.com", "key": "sk-speka-live-vXGIXcvPnujoKgaQuJZRG22cOFYUjTYv", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk274mz8@gmail.com", "key": "sk-speka-live-Nb2nsO_gkaYqP3uIIndjAUUyVcHZ8mhY", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk268flc@gmail.com", "key": "sk-speka-live-_ZPLa_WiuGytfYQ8QF_0lJPuCwSQy-yR", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk265713@gmail.com", "key": "sk-speka-live-MR1N5WYYy1ypxVH3PLM8isDncJLAWu7k", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk273o3f@gmail.com", "key": "sk-speka-live-RFFaOTvJBK42jRLILerus9RqKhf7SR8b", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk276d7c@gmail.com", "key": "sk-speka-live-uXzHOgGETCGkSBTBsA7hZ6klinn1fY6f", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk280rlg@gmail.com", "key": "sk-speka-live-QGeWPjBwuRrJRtjmzGmPbiIn6efD-pWT", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk270wf3@gmail.com", "key": "sk-speka-live-lJ1BbORcU2plnD6HyenQgjmkcKJ-F3V3", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk272aoy@gmail.com", "key": "sk-speka-live-0vziuaKMSgsq3_HBZLAyQx1eIyenNsjS", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk285q0t@gmail.com", "key": "sk-speka-live-qifo7atsBwQUR_b4eb6VsZhX8R79kJD_", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2780h5@gmail.com", "key": "sk-speka-live-OoUZ5VeAjPvUrlrt-MjQBtqUd4MtYti7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2790lz@gmail.com", "key": "sk-speka-live-a3cF0ob82Wr3kkhkPz50WjKUH0RCciyz", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk275865@gmail.com", "key": "sk-speka-live-Ci61dLQDr0U6KZCZ2IXKMtC85gBAuagU", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk287nan@gmail.com", "key": "sk-speka-live-VZ5I7WxaEr1Cs5tgrWqIpumxs20IkFEW", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2894a6@gmail.com", "key": "sk-speka-live-mAs7oRvzpCgLBxhlJmhBd70FlVTPX1C7", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2847bs@gmail.com", "key": "sk-speka-live-Js7kDNEC2j514kkoJzKK4j4Kc4lQHeQU", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk277q5y@gmail.com", "key": "sk-speka-live-1XKgchJInsckJIRTgMdJkGIajtIqFbEL", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk28833d@gmail.com", "key": "sk-speka-live-UfFFH1Ib_CuOy9wOhQlkbHSZ2TSrNx_g", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk283pd0@gmail.com", "key": "sk-speka-live--ammzYHfAbGbvp29SmNhm_Y4RlfKxZ5A", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2812s9@gmail.com", "key": "sk-speka-live-ce-mujhjIzr3ZWMDcCOpFTL-xS70LWE-", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk282g4u@gmail.com", "key": "sk-speka-live-bo4wOUaJb5idWlMcHMZIxptwKTVtI9mB", "ok": true, "cost": 0.0, "left": 1.0} +{"email": "baradok609+spk2867ey@gmail.com", "key": "sk-speka-live-SJqmS92pekXHtIFyHHoN1emMMPDy_-Ou", "ok": true, "cost": 0.0, "left": 1.0} diff --git a/qs1.sql b/qs1.sql new file mode 100644 index 0000000..dbd188d --- /dev/null +++ b/qs1.sql @@ -0,0 +1 @@ +select id,name,type,base_url,priority,status,"group",tag,auto_ban from channels order by id desc limit 5; diff --git a/qs2.sql b/qs2.sql new file mode 100644 index 0000000..a848076 --- /dev/null +++ b/qs2.sql @@ -0,0 +1,2 @@ +select count(*) from channels; +select model,count(*) from abilities where "group"='default' and enabled group by model having model like '%nemotron%' or model like '%muse%' or model like '%step-5%' or model like '%laguna%'; diff --git a/qs3.sql b/qs3.sql new file mode 100644 index 0000000..fd54ecc --- /dev/null +++ b/qs3.sql @@ -0,0 +1 @@ +select column_name, data_type, is_nullable, column_default from information_schema.columns where table_name='channels' order by ordinal_position; diff --git a/qs4.sql b/qs4.sql new file mode 100644 index 0000000..313252f --- /dev/null +++ b/qs4.sql @@ -0,0 +1 @@ +select id,name,type,base_url,priority,status,"group",auto_ban,weight,tag,models,setting,other,other_info,key is not null as k from channels where name like 'ur-pool%' or name like 'bria-pool%' or name like 'llm7%' limit 3; diff --git a/qs5.sql b/qs5.sql new file mode 100644 index 0000000..88e8ff4 --- /dev/null +++ b/qs5.sql @@ -0,0 +1,3 @@ +select count(*) from tokens where model_limits like '%speka-%'; +select id,token_name,"group" from tokens where status=1 and "group"='premium' and model_limits like '%speka-step5%' limit 3; +select model,count(*) from abilities where model like 'speka-%' group by model; diff --git a/qs6.sql b/qs6.sql new file mode 100644 index 0000000..e6ee1b5 --- /dev/null +++ b/qs6.sql @@ -0,0 +1 @@ +select key from tokens where status=1 and "group"='premium' and model_limits like '%speka-step5%' limit 1; diff --git a/r_api_keys.json b/r_api_keys.json new file mode 100644 index 0000000..dcfef46 --- /dev/null +++ b/r_api_keys.json @@ -0,0 +1 @@ +{"code":"PGRST301","details":null,"hint":null,"message":"Empty JWT is sent in Authorization header"} \ No newline at end of file diff --git a/r_profiles.json b/r_profiles.json new file mode 100644 index 0000000..dcfef46 --- /dev/null +++ b/r_profiles.json @@ -0,0 +1 @@ +{"code":"PGRST301","details":null,"hint":null,"message":"Empty JWT is sent in Authorization header"} \ No newline at end of file diff --git a/r_subscriptions.json b/r_subscriptions.json new file mode 100644 index 0000000..dcfef46 --- /dev/null +++ b/r_subscriptions.json @@ -0,0 +1 @@ +{"code":"PGRST301","details":null,"hint":null,"message":"Empty JWT is sent in Authorization header"} \ No newline at end of file diff --git a/r_usage_current_month.json b/r_usage_current_month.json new file mode 100644 index 0000000..dcfef46 --- /dev/null +++ b/r_usage_current_month.json @@ -0,0 +1 @@ +{"code":"PGRST301","details":null,"hint":null,"message":"Empty JWT is sent in Authorization header"} \ No newline at end of file diff --git a/rest.json b/rest.json new file mode 100644 index 0000000..269102f --- /dev/null +++ b/rest.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"description":"","title":"standard public schema","version":"14.12"},"host":"0.0.0.0:3000","basePath":"/","schemes":["http"],"consumes":["application/json","application/vnd.pgrst.object+json;nulls=stripped","application/vnd.pgrst.object+json","text/csv"],"produces":["application/json","application/vnd.pgrst.object+json;nulls=stripped","application/vnd.pgrst.object+json","text/csv"],"paths":{"/":{"get":{"produces":["application/openapi+json","application/json"],"responses":{"200":{"description":"OK"}},"summary":"OpenAPI description (this document)","tags":["Introspection"]}},"/model_sweeps":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.model_sweeps.id"},{"$ref":"#/parameters/rowFilter.model_sweeps.kind"},{"$ref":"#/parameters/rowFilter.model_sweeps.trigger"},{"$ref":"#/parameters/rowFilter.model_sweeps.started_at"},{"$ref":"#/parameters/rowFilter.model_sweeps.finished_at"},{"$ref":"#/parameters/rowFilter.model_sweeps.checked"},{"$ref":"#/parameters/rowFilter.model_sweeps.ok_count"},{"$ref":"#/parameters/rowFilter.model_sweeps.failed"},{"$ref":"#/parameters/rowFilter.model_sweeps.discovered"},{"$ref":"#/parameters/rowFilter.model_sweeps.retired"},{"$ref":"#/parameters/rowFilter.model_sweeps.error"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/model_sweeps"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["model_sweeps"]},"post":{"parameters":[{"$ref":"#/parameters/body.model_sweeps"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["model_sweeps"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.model_sweeps.id"},{"$ref":"#/parameters/rowFilter.model_sweeps.kind"},{"$ref":"#/parameters/rowFilter.model_sweeps.trigger"},{"$ref":"#/parameters/rowFilter.model_sweeps.started_at"},{"$ref":"#/parameters/rowFilter.model_sweeps.finished_at"},{"$ref":"#/parameters/rowFilter.model_sweeps.checked"},{"$ref":"#/parameters/rowFilter.model_sweeps.ok_count"},{"$ref":"#/parameters/rowFilter.model_sweeps.failed"},{"$ref":"#/parameters/rowFilter.model_sweeps.discovered"},{"$ref":"#/parameters/rowFilter.model_sweeps.retired"},{"$ref":"#/parameters/rowFilter.model_sweeps.error"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["model_sweeps"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.model_sweeps.id"},{"$ref":"#/parameters/rowFilter.model_sweeps.kind"},{"$ref":"#/parameters/rowFilter.model_sweeps.trigger"},{"$ref":"#/parameters/rowFilter.model_sweeps.started_at"},{"$ref":"#/parameters/rowFilter.model_sweeps.finished_at"},{"$ref":"#/parameters/rowFilter.model_sweeps.checked"},{"$ref":"#/parameters/rowFilter.model_sweeps.ok_count"},{"$ref":"#/parameters/rowFilter.model_sweeps.failed"},{"$ref":"#/parameters/rowFilter.model_sweeps.discovered"},{"$ref":"#/parameters/rowFilter.model_sweeps.retired"},{"$ref":"#/parameters/rowFilter.model_sweeps.error"},{"$ref":"#/parameters/body.model_sweeps"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["model_sweeps"]}},"/api_keys":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.api_keys.id"},{"$ref":"#/parameters/rowFilter.api_keys.user_id"},{"$ref":"#/parameters/rowFilter.api_keys.name"},{"$ref":"#/parameters/rowFilter.api_keys.key_hash"},{"$ref":"#/parameters/rowFilter.api_keys.prefix"},{"$ref":"#/parameters/rowFilter.api_keys.last4"},{"$ref":"#/parameters/rowFilter.api_keys.revoked"},{"$ref":"#/parameters/rowFilter.api_keys.last_used_at"},{"$ref":"#/parameters/rowFilter.api_keys.created_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/api_keys"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["api_keys"]},"post":{"parameters":[{"$ref":"#/parameters/body.api_keys"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["api_keys"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.api_keys.id"},{"$ref":"#/parameters/rowFilter.api_keys.user_id"},{"$ref":"#/parameters/rowFilter.api_keys.name"},{"$ref":"#/parameters/rowFilter.api_keys.key_hash"},{"$ref":"#/parameters/rowFilter.api_keys.prefix"},{"$ref":"#/parameters/rowFilter.api_keys.last4"},{"$ref":"#/parameters/rowFilter.api_keys.revoked"},{"$ref":"#/parameters/rowFilter.api_keys.last_used_at"},{"$ref":"#/parameters/rowFilter.api_keys.created_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["api_keys"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.api_keys.id"},{"$ref":"#/parameters/rowFilter.api_keys.user_id"},{"$ref":"#/parameters/rowFilter.api_keys.name"},{"$ref":"#/parameters/rowFilter.api_keys.key_hash"},{"$ref":"#/parameters/rowFilter.api_keys.prefix"},{"$ref":"#/parameters/rowFilter.api_keys.last4"},{"$ref":"#/parameters/rowFilter.api_keys.revoked"},{"$ref":"#/parameters/rowFilter.api_keys.last_used_at"},{"$ref":"#/parameters/rowFilter.api_keys.created_at"},{"$ref":"#/parameters/body.api_keys"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["api_keys"]}},"/model_registry":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.model_registry.id"},{"$ref":"#/parameters/rowFilter.model_registry.name"},{"$ref":"#/parameters/rowFilter.model_registry.publisher"},{"$ref":"#/parameters/rowFilter.model_registry.category"},{"$ref":"#/parameters/rowFilter.model_registry.endpoint"},{"$ref":"#/parameters/rowFilter.model_registry.description"},{"$ref":"#/parameters/rowFilter.model_registry.context_window"},{"$ref":"#/parameters/rowFilter.model_registry.price_input"},{"$ref":"#/parameters/rowFilter.model_registry.price_output"},{"$ref":"#/parameters/rowFilter.model_registry.per_image"},{"$ref":"#/parameters/rowFilter.model_registry.capabilities"},{"$ref":"#/parameters/rowFilter.model_registry.featured"},{"$ref":"#/parameters/rowFilter.model_registry.source"},{"$ref":"#/parameters/rowFilter.model_registry.enabled"},{"$ref":"#/parameters/rowFilter.model_registry.auto_managed"},{"$ref":"#/parameters/rowFilter.model_registry.auto_disabled"},{"$ref":"#/parameters/rowFilter.model_registry.status"},{"$ref":"#/parameters/rowFilter.model_registry.listed_upstream"},{"$ref":"#/parameters/rowFilter.model_registry.last_checked_at"},{"$ref":"#/parameters/rowFilter.model_registry.last_ok_at"},{"$ref":"#/parameters/rowFilter.model_registry.last_error"},{"$ref":"#/parameters/rowFilter.model_registry.last_http_status"},{"$ref":"#/parameters/rowFilter.model_registry.latency_ms"},{"$ref":"#/parameters/rowFilter.model_registry.consecutive_failures"},{"$ref":"#/parameters/rowFilter.model_registry.checks_total"},{"$ref":"#/parameters/rowFilter.model_registry.checks_ok"},{"$ref":"#/parameters/rowFilter.model_registry.first_seen_at"},{"$ref":"#/parameters/rowFilter.model_registry.retired_at"},{"$ref":"#/parameters/rowFilter.model_registry.notes"},{"$ref":"#/parameters/rowFilter.model_registry.created_at"},{"$ref":"#/parameters/rowFilter.model_registry.updated_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/model_registry"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["model_registry"]},"post":{"parameters":[{"$ref":"#/parameters/body.model_registry"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["model_registry"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.model_registry.id"},{"$ref":"#/parameters/rowFilter.model_registry.name"},{"$ref":"#/parameters/rowFilter.model_registry.publisher"},{"$ref":"#/parameters/rowFilter.model_registry.category"},{"$ref":"#/parameters/rowFilter.model_registry.endpoint"},{"$ref":"#/parameters/rowFilter.model_registry.description"},{"$ref":"#/parameters/rowFilter.model_registry.context_window"},{"$ref":"#/parameters/rowFilter.model_registry.price_input"},{"$ref":"#/parameters/rowFilter.model_registry.price_output"},{"$ref":"#/parameters/rowFilter.model_registry.per_image"},{"$ref":"#/parameters/rowFilter.model_registry.capabilities"},{"$ref":"#/parameters/rowFilter.model_registry.featured"},{"$ref":"#/parameters/rowFilter.model_registry.source"},{"$ref":"#/parameters/rowFilter.model_registry.enabled"},{"$ref":"#/parameters/rowFilter.model_registry.auto_managed"},{"$ref":"#/parameters/rowFilter.model_registry.auto_disabled"},{"$ref":"#/parameters/rowFilter.model_registry.status"},{"$ref":"#/parameters/rowFilter.model_registry.listed_upstream"},{"$ref":"#/parameters/rowFilter.model_registry.last_checked_at"},{"$ref":"#/parameters/rowFilter.model_registry.last_ok_at"},{"$ref":"#/parameters/rowFilter.model_registry.last_error"},{"$ref":"#/parameters/rowFilter.model_registry.last_http_status"},{"$ref":"#/parameters/rowFilter.model_registry.latency_ms"},{"$ref":"#/parameters/rowFilter.model_registry.consecutive_failures"},{"$ref":"#/parameters/rowFilter.model_registry.checks_total"},{"$ref":"#/parameters/rowFilter.model_registry.checks_ok"},{"$ref":"#/parameters/rowFilter.model_registry.first_seen_at"},{"$ref":"#/parameters/rowFilter.model_registry.retired_at"},{"$ref":"#/parameters/rowFilter.model_registry.notes"},{"$ref":"#/parameters/rowFilter.model_registry.created_at"},{"$ref":"#/parameters/rowFilter.model_registry.updated_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["model_registry"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.model_registry.id"},{"$ref":"#/parameters/rowFilter.model_registry.name"},{"$ref":"#/parameters/rowFilter.model_registry.publisher"},{"$ref":"#/parameters/rowFilter.model_registry.category"},{"$ref":"#/parameters/rowFilter.model_registry.endpoint"},{"$ref":"#/parameters/rowFilter.model_registry.description"},{"$ref":"#/parameters/rowFilter.model_registry.context_window"},{"$ref":"#/parameters/rowFilter.model_registry.price_input"},{"$ref":"#/parameters/rowFilter.model_registry.price_output"},{"$ref":"#/parameters/rowFilter.model_registry.per_image"},{"$ref":"#/parameters/rowFilter.model_registry.capabilities"},{"$ref":"#/parameters/rowFilter.model_registry.featured"},{"$ref":"#/parameters/rowFilter.model_registry.source"},{"$ref":"#/parameters/rowFilter.model_registry.enabled"},{"$ref":"#/parameters/rowFilter.model_registry.auto_managed"},{"$ref":"#/parameters/rowFilter.model_registry.auto_disabled"},{"$ref":"#/parameters/rowFilter.model_registry.status"},{"$ref":"#/parameters/rowFilter.model_registry.listed_upstream"},{"$ref":"#/parameters/rowFilter.model_registry.last_checked_at"},{"$ref":"#/parameters/rowFilter.model_registry.last_ok_at"},{"$ref":"#/parameters/rowFilter.model_registry.last_error"},{"$ref":"#/parameters/rowFilter.model_registry.last_http_status"},{"$ref":"#/parameters/rowFilter.model_registry.latency_ms"},{"$ref":"#/parameters/rowFilter.model_registry.consecutive_failures"},{"$ref":"#/parameters/rowFilter.model_registry.checks_total"},{"$ref":"#/parameters/rowFilter.model_registry.checks_ok"},{"$ref":"#/parameters/rowFilter.model_registry.first_seen_at"},{"$ref":"#/parameters/rowFilter.model_registry.retired_at"},{"$ref":"#/parameters/rowFilter.model_registry.notes"},{"$ref":"#/parameters/rowFilter.model_registry.created_at"},{"$ref":"#/parameters/rowFilter.model_registry.updated_at"},{"$ref":"#/parameters/body.model_registry"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["model_registry"]}},"/usage_events":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.usage_events.id"},{"$ref":"#/parameters/rowFilter.usage_events.user_id"},{"$ref":"#/parameters/rowFilter.usage_events.api_key_id"},{"$ref":"#/parameters/rowFilter.usage_events.model"},{"$ref":"#/parameters/rowFilter.usage_events.endpoint"},{"$ref":"#/parameters/rowFilter.usage_events.prompt_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.completion_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.total_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.cost_usd"},{"$ref":"#/parameters/rowFilter.usage_events.status"},{"$ref":"#/parameters/rowFilter.usage_events.latency_ms"},{"$ref":"#/parameters/rowFilter.usage_events.source"},{"$ref":"#/parameters/rowFilter.usage_events.created_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/usage_events"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["usage_events"]},"post":{"parameters":[{"$ref":"#/parameters/body.usage_events"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["usage_events"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.usage_events.id"},{"$ref":"#/parameters/rowFilter.usage_events.user_id"},{"$ref":"#/parameters/rowFilter.usage_events.api_key_id"},{"$ref":"#/parameters/rowFilter.usage_events.model"},{"$ref":"#/parameters/rowFilter.usage_events.endpoint"},{"$ref":"#/parameters/rowFilter.usage_events.prompt_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.completion_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.total_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.cost_usd"},{"$ref":"#/parameters/rowFilter.usage_events.status"},{"$ref":"#/parameters/rowFilter.usage_events.latency_ms"},{"$ref":"#/parameters/rowFilter.usage_events.source"},{"$ref":"#/parameters/rowFilter.usage_events.created_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["usage_events"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.usage_events.id"},{"$ref":"#/parameters/rowFilter.usage_events.user_id"},{"$ref":"#/parameters/rowFilter.usage_events.api_key_id"},{"$ref":"#/parameters/rowFilter.usage_events.model"},{"$ref":"#/parameters/rowFilter.usage_events.endpoint"},{"$ref":"#/parameters/rowFilter.usage_events.prompt_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.completion_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.total_tokens"},{"$ref":"#/parameters/rowFilter.usage_events.cost_usd"},{"$ref":"#/parameters/rowFilter.usage_events.status"},{"$ref":"#/parameters/rowFilter.usage_events.latency_ms"},{"$ref":"#/parameters/rowFilter.usage_events.source"},{"$ref":"#/parameters/rowFilter.usage_events.created_at"},{"$ref":"#/parameters/body.usage_events"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["usage_events"]}},"/profiles":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.profiles.id"},{"$ref":"#/parameters/rowFilter.profiles.email"},{"$ref":"#/parameters/rowFilter.profiles.full_name"},{"$ref":"#/parameters/rowFilter.profiles.role"},{"$ref":"#/parameters/rowFilter.profiles.plan"},{"$ref":"#/parameters/rowFilter.profiles.stripe_customer_id"},{"$ref":"#/parameters/rowFilter.profiles.credits_balance"},{"$ref":"#/parameters/rowFilter.profiles.status"},{"$ref":"#/parameters/rowFilter.profiles.created_at"},{"$ref":"#/parameters/rowFilter.profiles.updated_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/profiles"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["profiles"]},"post":{"parameters":[{"$ref":"#/parameters/body.profiles"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["profiles"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.profiles.id"},{"$ref":"#/parameters/rowFilter.profiles.email"},{"$ref":"#/parameters/rowFilter.profiles.full_name"},{"$ref":"#/parameters/rowFilter.profiles.role"},{"$ref":"#/parameters/rowFilter.profiles.plan"},{"$ref":"#/parameters/rowFilter.profiles.stripe_customer_id"},{"$ref":"#/parameters/rowFilter.profiles.credits_balance"},{"$ref":"#/parameters/rowFilter.profiles.status"},{"$ref":"#/parameters/rowFilter.profiles.created_at"},{"$ref":"#/parameters/rowFilter.profiles.updated_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["profiles"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.profiles.id"},{"$ref":"#/parameters/rowFilter.profiles.email"},{"$ref":"#/parameters/rowFilter.profiles.full_name"},{"$ref":"#/parameters/rowFilter.profiles.role"},{"$ref":"#/parameters/rowFilter.profiles.plan"},{"$ref":"#/parameters/rowFilter.profiles.stripe_customer_id"},{"$ref":"#/parameters/rowFilter.profiles.credits_balance"},{"$ref":"#/parameters/rowFilter.profiles.status"},{"$ref":"#/parameters/rowFilter.profiles.created_at"},{"$ref":"#/parameters/rowFilter.profiles.updated_at"},{"$ref":"#/parameters/body.profiles"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["profiles"]}},"/subscriptions":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.subscriptions.id"},{"$ref":"#/parameters/rowFilter.subscriptions.user_id"},{"$ref":"#/parameters/rowFilter.subscriptions.stripe_subscription_id"},{"$ref":"#/parameters/rowFilter.subscriptions.stripe_price_id"},{"$ref":"#/parameters/rowFilter.subscriptions.plan"},{"$ref":"#/parameters/rowFilter.subscriptions.status"},{"$ref":"#/parameters/rowFilter.subscriptions.current_period_start"},{"$ref":"#/parameters/rowFilter.subscriptions.current_period_end"},{"$ref":"#/parameters/rowFilter.subscriptions.cancel_at_period_end"},{"$ref":"#/parameters/rowFilter.subscriptions.created_at"},{"$ref":"#/parameters/rowFilter.subscriptions.updated_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/subscriptions"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["subscriptions"]},"post":{"parameters":[{"$ref":"#/parameters/body.subscriptions"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["subscriptions"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.subscriptions.id"},{"$ref":"#/parameters/rowFilter.subscriptions.user_id"},{"$ref":"#/parameters/rowFilter.subscriptions.stripe_subscription_id"},{"$ref":"#/parameters/rowFilter.subscriptions.stripe_price_id"},{"$ref":"#/parameters/rowFilter.subscriptions.plan"},{"$ref":"#/parameters/rowFilter.subscriptions.status"},{"$ref":"#/parameters/rowFilter.subscriptions.current_period_start"},{"$ref":"#/parameters/rowFilter.subscriptions.current_period_end"},{"$ref":"#/parameters/rowFilter.subscriptions.cancel_at_period_end"},{"$ref":"#/parameters/rowFilter.subscriptions.created_at"},{"$ref":"#/parameters/rowFilter.subscriptions.updated_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["subscriptions"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.subscriptions.id"},{"$ref":"#/parameters/rowFilter.subscriptions.user_id"},{"$ref":"#/parameters/rowFilter.subscriptions.stripe_subscription_id"},{"$ref":"#/parameters/rowFilter.subscriptions.stripe_price_id"},{"$ref":"#/parameters/rowFilter.subscriptions.plan"},{"$ref":"#/parameters/rowFilter.subscriptions.status"},{"$ref":"#/parameters/rowFilter.subscriptions.current_period_start"},{"$ref":"#/parameters/rowFilter.subscriptions.current_period_end"},{"$ref":"#/parameters/rowFilter.subscriptions.cancel_at_period_end"},{"$ref":"#/parameters/rowFilter.subscriptions.created_at"},{"$ref":"#/parameters/rowFilter.subscriptions.updated_at"},{"$ref":"#/parameters/body.subscriptions"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["subscriptions"]}},"/usage_current_month":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.usage_current_month.user_id"},{"$ref":"#/parameters/rowFilter.usage_current_month.requests"},{"$ref":"#/parameters/rowFilter.usage_current_month.tokens"},{"$ref":"#/parameters/rowFilter.usage_current_month.cost_usd"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/usage_current_month"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["usage_current_month"]}},"/contact_messages":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.contact_messages.id"},{"$ref":"#/parameters/rowFilter.contact_messages.name"},{"$ref":"#/parameters/rowFilter.contact_messages.email"},{"$ref":"#/parameters/rowFilter.contact_messages.message"},{"$ref":"#/parameters/rowFilter.contact_messages.created_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/contact_messages"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["contact_messages"]},"post":{"parameters":[{"$ref":"#/parameters/body.contact_messages"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["contact_messages"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.contact_messages.id"},{"$ref":"#/parameters/rowFilter.contact_messages.name"},{"$ref":"#/parameters/rowFilter.contact_messages.email"},{"$ref":"#/parameters/rowFilter.contact_messages.message"},{"$ref":"#/parameters/rowFilter.contact_messages.created_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["contact_messages"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.contact_messages.id"},{"$ref":"#/parameters/rowFilter.contact_messages.name"},{"$ref":"#/parameters/rowFilter.contact_messages.email"},{"$ref":"#/parameters/rowFilter.contact_messages.message"},{"$ref":"#/parameters/rowFilter.contact_messages.created_at"},{"$ref":"#/parameters/body.contact_messages"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["contact_messages"]}},"/model_health_checks":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.model_health_checks.id"},{"$ref":"#/parameters/rowFilter.model_health_checks.model_id"},{"$ref":"#/parameters/rowFilter.model_health_checks.ok"},{"$ref":"#/parameters/rowFilter.model_health_checks.status"},{"$ref":"#/parameters/rowFilter.model_health_checks.http_status"},{"$ref":"#/parameters/rowFilter.model_health_checks.latency_ms"},{"$ref":"#/parameters/rowFilter.model_health_checks.error"},{"$ref":"#/parameters/rowFilter.model_health_checks.sample"},{"$ref":"#/parameters/rowFilter.model_health_checks.trigger"},{"$ref":"#/parameters/rowFilter.model_health_checks.checked_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/model_health_checks"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["model_health_checks"]},"post":{"parameters":[{"$ref":"#/parameters/body.model_health_checks"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["model_health_checks"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.model_health_checks.id"},{"$ref":"#/parameters/rowFilter.model_health_checks.model_id"},{"$ref":"#/parameters/rowFilter.model_health_checks.ok"},{"$ref":"#/parameters/rowFilter.model_health_checks.status"},{"$ref":"#/parameters/rowFilter.model_health_checks.http_status"},{"$ref":"#/parameters/rowFilter.model_health_checks.latency_ms"},{"$ref":"#/parameters/rowFilter.model_health_checks.error"},{"$ref":"#/parameters/rowFilter.model_health_checks.sample"},{"$ref":"#/parameters/rowFilter.model_health_checks.trigger"},{"$ref":"#/parameters/rowFilter.model_health_checks.checked_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["model_health_checks"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.model_health_checks.id"},{"$ref":"#/parameters/rowFilter.model_health_checks.model_id"},{"$ref":"#/parameters/rowFilter.model_health_checks.ok"},{"$ref":"#/parameters/rowFilter.model_health_checks.status"},{"$ref":"#/parameters/rowFilter.model_health_checks.http_status"},{"$ref":"#/parameters/rowFilter.model_health_checks.latency_ms"},{"$ref":"#/parameters/rowFilter.model_health_checks.error"},{"$ref":"#/parameters/rowFilter.model_health_checks.sample"},{"$ref":"#/parameters/rowFilter.model_health_checks.trigger"},{"$ref":"#/parameters/rowFilter.model_health_checks.checked_at"},{"$ref":"#/parameters/body.model_health_checks"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["model_health_checks"]}},"/blog_posts":{"get":{"parameters":[{"$ref":"#/parameters/rowFilter.blog_posts.id"},{"$ref":"#/parameters/rowFilter.blog_posts.slug"},{"$ref":"#/parameters/rowFilter.blog_posts.title"},{"$ref":"#/parameters/rowFilter.blog_posts.excerpt"},{"$ref":"#/parameters/rowFilter.blog_posts.content"},{"$ref":"#/parameters/rowFilter.blog_posts.cover_image"},{"$ref":"#/parameters/rowFilter.blog_posts.tags"},{"$ref":"#/parameters/rowFilter.blog_posts.author_id"},{"$ref":"#/parameters/rowFilter.blog_posts.author_name"},{"$ref":"#/parameters/rowFilter.blog_posts.status"},{"$ref":"#/parameters/rowFilter.blog_posts.published_at"},{"$ref":"#/parameters/rowFilter.blog_posts.created_at"},{"$ref":"#/parameters/rowFilter.blog_posts.updated_at"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/order"},{"$ref":"#/parameters/range"},{"$ref":"#/parameters/rangeUnit"},{"$ref":"#/parameters/offset"},{"$ref":"#/parameters/limit"},{"$ref":"#/parameters/preferCount"}],"responses":{"200":{"description":"OK","schema":{"items":{"$ref":"#/definitions/blog_posts"},"type":"array"}},"206":{"description":"Partial Content"}},"tags":["blog_posts"]},"post":{"parameters":[{"$ref":"#/parameters/body.blog_posts"},{"$ref":"#/parameters/select"},{"$ref":"#/parameters/preferPost"}],"responses":{"201":{"description":"Created"}},"tags":["blog_posts"]},"delete":{"parameters":[{"$ref":"#/parameters/rowFilter.blog_posts.id"},{"$ref":"#/parameters/rowFilter.blog_posts.slug"},{"$ref":"#/parameters/rowFilter.blog_posts.title"},{"$ref":"#/parameters/rowFilter.blog_posts.excerpt"},{"$ref":"#/parameters/rowFilter.blog_posts.content"},{"$ref":"#/parameters/rowFilter.blog_posts.cover_image"},{"$ref":"#/parameters/rowFilter.blog_posts.tags"},{"$ref":"#/parameters/rowFilter.blog_posts.author_id"},{"$ref":"#/parameters/rowFilter.blog_posts.author_name"},{"$ref":"#/parameters/rowFilter.blog_posts.status"},{"$ref":"#/parameters/rowFilter.blog_posts.published_at"},{"$ref":"#/parameters/rowFilter.blog_posts.created_at"},{"$ref":"#/parameters/rowFilter.blog_posts.updated_at"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["blog_posts"]},"patch":{"parameters":[{"$ref":"#/parameters/rowFilter.blog_posts.id"},{"$ref":"#/parameters/rowFilter.blog_posts.slug"},{"$ref":"#/parameters/rowFilter.blog_posts.title"},{"$ref":"#/parameters/rowFilter.blog_posts.excerpt"},{"$ref":"#/parameters/rowFilter.blog_posts.content"},{"$ref":"#/parameters/rowFilter.blog_posts.cover_image"},{"$ref":"#/parameters/rowFilter.blog_posts.tags"},{"$ref":"#/parameters/rowFilter.blog_posts.author_id"},{"$ref":"#/parameters/rowFilter.blog_posts.author_name"},{"$ref":"#/parameters/rowFilter.blog_posts.status"},{"$ref":"#/parameters/rowFilter.blog_posts.published_at"},{"$ref":"#/parameters/rowFilter.blog_posts.created_at"},{"$ref":"#/parameters/rowFilter.blog_posts.updated_at"},{"$ref":"#/parameters/body.blog_posts"},{"$ref":"#/parameters/preferReturn"}],"responses":{"204":{"description":"No Content"}},"tags":["blog_posts"]}}},"definitions":{"model_sweeps":{"required":["id","kind","trigger","started_at","checked","ok_count","failed","discovered","retired"],"properties":{"id":{"description":"Note:\nThis is a Primary Key.","format":"int64","type":"integer"},"kind":{"default":"health","format":"text","type":"string"},"trigger":{"default":"schedule","format":"text","type":"string"},"started_at":{"default":"now()","format":"timestamp with time zone","type":"string"},"finished_at":{"format":"timestamp with time zone","type":"string"},"checked":{"default":0,"format":"int32","type":"integer"},"ok_count":{"default":0,"format":"int32","type":"integer"},"failed":{"default":0,"format":"int32","type":"integer"},"discovered":{"default":0,"format":"int32","type":"integer"},"retired":{"default":0,"format":"int32","type":"integer"},"error":{"format":"text","type":"string"}},"type":"object"},"api_keys":{"required":["id","user_id","name","key_hash","prefix","last4","revoked","created_at"],"properties":{"id":{"default":"gen_random_uuid()","description":"Note:\nThis is a Primary Key.","format":"uuid","type":"string"},"user_id":{"description":"Note:\nThis is a Foreign Key to `profiles.id`.","format":"uuid","type":"string"},"name":{"default":"Default key","format":"text","type":"string"},"key_hash":{"format":"text","type":"string"},"prefix":{"format":"text","type":"string"},"last4":{"format":"text","type":"string"},"revoked":{"default":false,"format":"boolean","type":"boolean"},"last_used_at":{"format":"timestamp with time zone","type":"string"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"model_registry":{"required":["id","name","publisher","category","endpoint","description","context_window","price_input","price_output","capabilities","featured","source","enabled","auto_managed","auto_disabled","status","listed_upstream","consecutive_failures","checks_total","checks_ok","first_seen_at","created_at","updated_at"],"properties":{"id":{"description":"Note:\nThis is a Primary Key.","format":"text","type":"string"},"name":{"format":"text","type":"string"},"publisher":{"default":"NVIDIA","format":"text","type":"string"},"category":{"default":"chat","format":"text","type":"string"},"endpoint":{"default":"chat","format":"text","type":"string"},"description":{"default":"","format":"text","type":"string"},"context_window":{"default":0,"format":"int32","type":"integer"},"price_input":{"default":0,"format":"numeric","type":"number"},"price_output":{"default":0,"format":"numeric","type":"number"},"per_image":{"format":"numeric","type":"number"},"capabilities":{"format":"text[]","items":{"type":"string"},"type":"array"},"featured":{"default":false,"format":"boolean","type":"boolean"},"source":{"default":"catalog","format":"text","type":"string"},"enabled":{"default":true,"format":"boolean","type":"boolean"},"auto_managed":{"default":true,"format":"boolean","type":"boolean"},"auto_disabled":{"default":false,"format":"boolean","type":"boolean"},"status":{"default":"untested","format":"text","type":"string"},"listed_upstream":{"default":false,"format":"boolean","type":"boolean"},"last_checked_at":{"format":"timestamp with time zone","type":"string"},"last_ok_at":{"format":"timestamp with time zone","type":"string"},"last_error":{"format":"text","type":"string"},"last_http_status":{"format":"int32","type":"integer"},"latency_ms":{"format":"int32","type":"integer"},"consecutive_failures":{"default":0,"format":"int32","type":"integer"},"checks_total":{"default":0,"format":"int64","type":"integer"},"checks_ok":{"default":0,"format":"int64","type":"integer"},"first_seen_at":{"default":"now()","format":"timestamp with time zone","type":"string"},"retired_at":{"format":"timestamp with time zone","type":"string"},"notes":{"format":"text","type":"string"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"},"updated_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"usage_events":{"required":["id","user_id","model","endpoint","prompt_tokens","completion_tokens","total_tokens","cost_usd","status","latency_ms","source","created_at"],"properties":{"id":{"description":"Note:\nThis is a Primary Key.","format":"int64","type":"integer"},"user_id":{"description":"Note:\nThis is a Foreign Key to `profiles.id`.","format":"uuid","type":"string"},"api_key_id":{"description":"Note:\nThis is a Foreign Key to `api_keys.id`.","format":"uuid","type":"string"},"model":{"format":"text","type":"string"},"endpoint":{"format":"text","type":"string"},"prompt_tokens":{"default":0,"format":"int32","type":"integer"},"completion_tokens":{"default":0,"format":"int32","type":"integer"},"total_tokens":{"default":0,"format":"int32","type":"integer"},"cost_usd":{"default":0,"format":"numeric","type":"number"},"status":{"default":200,"format":"int32","type":"integer"},"latency_ms":{"default":0,"format":"int32","type":"integer"},"source":{"default":"api","format":"text","type":"string"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"profiles":{"required":["id","role","plan","credits_balance","status","created_at","updated_at"],"properties":{"id":{"description":"Note:\nThis is a Primary Key.","format":"uuid","type":"string"},"email":{"format":"text","type":"string"},"full_name":{"format":"text","type":"string"},"role":{"default":"user","format":"text","type":"string"},"plan":{"default":"free","format":"text","type":"string"},"stripe_customer_id":{"format":"text","type":"string"},"credits_balance":{"default":0,"format":"numeric","type":"number"},"status":{"default":"active","format":"text","type":"string"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"},"updated_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"subscriptions":{"required":["id","user_id","plan","status","cancel_at_period_end","created_at","updated_at"],"properties":{"id":{"default":"gen_random_uuid()","description":"Note:\nThis is a Primary Key.","format":"uuid","type":"string"},"user_id":{"description":"Note:\nThis is a Foreign Key to `profiles.id`.","format":"uuid","type":"string"},"stripe_subscription_id":{"format":"text","type":"string"},"stripe_price_id":{"format":"text","type":"string"},"plan":{"default":"free","format":"text","type":"string"},"status":{"default":"inactive","format":"text","type":"string"},"current_period_start":{"format":"timestamp with time zone","type":"string"},"current_period_end":{"format":"timestamp with time zone","type":"string"},"cancel_at_period_end":{"default":false,"format":"boolean","type":"boolean"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"},"updated_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"usage_current_month":{"properties":{"user_id":{"description":"Note:\nThis is a Foreign Key to `profiles.id`.","format":"uuid","type":"string"},"requests":{"format":"int64","type":"integer"},"tokens":{"format":"int64","type":"integer"},"cost_usd":{"format":"numeric","type":"number"}},"type":"object"},"contact_messages":{"required":["id","name","email","message","created_at"],"properties":{"id":{"default":"gen_random_uuid()","description":"Note:\nThis is a Primary Key.","format":"uuid","type":"string"},"name":{"format":"text","type":"string"},"email":{"format":"text","type":"string"},"message":{"format":"text","type":"string"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"model_health_checks":{"required":["id","model_id","ok","status","latency_ms","trigger","checked_at"],"properties":{"id":{"description":"Note:\nThis is a Primary Key.","format":"int64","type":"integer"},"model_id":{"format":"text","type":"string"},"ok":{"format":"boolean","type":"boolean"},"status":{"format":"text","type":"string"},"http_status":{"format":"int32","type":"integer"},"latency_ms":{"default":0,"format":"int32","type":"integer"},"error":{"format":"text","type":"string"},"sample":{"format":"text","type":"string"},"trigger":{"default":"schedule","format":"text","type":"string"},"checked_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"},"blog_posts":{"required":["id","slug","title","excerpt","content","tags","status","created_at","updated_at"],"properties":{"id":{"default":"gen_random_uuid()","description":"Note:\nThis is a Primary Key.","format":"uuid","type":"string"},"slug":{"format":"text","type":"string"},"title":{"format":"text","type":"string"},"excerpt":{"default":"","format":"text","type":"string"},"content":{"default":"","format":"text","type":"string"},"cover_image":{"format":"text","type":"string"},"tags":{"format":"text[]","items":{"type":"string"},"type":"array"},"author_id":{"description":"Note:\nThis is a Foreign Key to `profiles.id`.","format":"uuid","type":"string"},"author_name":{"format":"text","type":"string"},"status":{"default":"draft","format":"text","type":"string"},"published_at":{"format":"timestamp with time zone","type":"string"},"created_at":{"default":"now()","format":"timestamp with time zone","type":"string"},"updated_at":{"default":"now()","format":"timestamp with time zone","type":"string"}},"type":"object"}},"parameters":{"preferParams":{"name":"Prefer","description":"Preference","required":false,"in":"header","type":"string"},"preferReturn":{"name":"Prefer","description":"Preference","required":false,"enum":["return=representation","return=minimal","return=none"],"in":"header","type":"string"},"preferCount":{"name":"Prefer","description":"Preference","required":false,"enum":["count=none"],"in":"header","type":"string"},"preferPost":{"name":"Prefer","description":"Preference","required":false,"enum":["return=representation","return=minimal","return=none","resolution=ignore-duplicates","resolution=merge-duplicates"],"in":"header","type":"string"},"select":{"name":"select","description":"Filtering Columns","required":false,"in":"query","type":"string"},"on_conflict":{"name":"on_conflict","description":"On Conflict","required":false,"in":"query","type":"string"},"order":{"name":"order","description":"Ordering","required":false,"in":"query","type":"string"},"range":{"name":"Range","description":"Limiting and Pagination","required":false,"in":"header","type":"string"},"rangeUnit":{"name":"Range-Unit","description":"Limiting and Pagination","required":false,"default":"items","in":"header","type":"string"},"offset":{"name":"offset","description":"Limiting and Pagination","required":false,"in":"query","type":"string"},"limit":{"name":"limit","description":"Limiting and Pagination","required":false,"in":"query","type":"string"},"body.model_sweeps":{"name":"model_sweeps","description":"model_sweeps","required":false,"in":"body","schema":{"$ref":"#/definitions/model_sweeps"}},"rowFilter.model_sweeps.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.kind":{"name":"kind","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.trigger":{"name":"trigger","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.started_at":{"name":"started_at","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.finished_at":{"name":"finished_at","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.checked":{"name":"checked","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.ok_count":{"name":"ok_count","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.failed":{"name":"failed","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.discovered":{"name":"discovered","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.retired":{"name":"retired","required":false,"in":"query","type":"string"},"rowFilter.model_sweeps.error":{"name":"error","required":false,"in":"query","type":"string"},"body.api_keys":{"name":"api_keys","description":"api_keys","required":false,"in":"body","schema":{"$ref":"#/definitions/api_keys"}},"rowFilter.api_keys.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.api_keys.user_id":{"name":"user_id","required":false,"in":"query","type":"string"},"rowFilter.api_keys.name":{"name":"name","required":false,"in":"query","type":"string"},"rowFilter.api_keys.key_hash":{"name":"key_hash","required":false,"in":"query","type":"string"},"rowFilter.api_keys.prefix":{"name":"prefix","required":false,"in":"query","type":"string"},"rowFilter.api_keys.last4":{"name":"last4","required":false,"in":"query","type":"string"},"rowFilter.api_keys.revoked":{"name":"revoked","required":false,"in":"query","type":"string"},"rowFilter.api_keys.last_used_at":{"name":"last_used_at","required":false,"in":"query","type":"string"},"rowFilter.api_keys.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"body.model_registry":{"name":"model_registry","description":"model_registry","required":false,"in":"body","schema":{"$ref":"#/definitions/model_registry"}},"rowFilter.model_registry.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.model_registry.name":{"name":"name","required":false,"in":"query","type":"string"},"rowFilter.model_registry.publisher":{"name":"publisher","required":false,"in":"query","type":"string"},"rowFilter.model_registry.category":{"name":"category","required":false,"in":"query","type":"string"},"rowFilter.model_registry.endpoint":{"name":"endpoint","required":false,"in":"query","type":"string"},"rowFilter.model_registry.description":{"name":"description","required":false,"in":"query","type":"string"},"rowFilter.model_registry.context_window":{"name":"context_window","required":false,"in":"query","type":"string"},"rowFilter.model_registry.price_input":{"name":"price_input","required":false,"in":"query","type":"string"},"rowFilter.model_registry.price_output":{"name":"price_output","required":false,"in":"query","type":"string"},"rowFilter.model_registry.per_image":{"name":"per_image","required":false,"in":"query","type":"string"},"rowFilter.model_registry.capabilities":{"name":"capabilities","required":false,"in":"query","type":"string"},"rowFilter.model_registry.featured":{"name":"featured","required":false,"in":"query","type":"string"},"rowFilter.model_registry.source":{"name":"source","required":false,"in":"query","type":"string"},"rowFilter.model_registry.enabled":{"name":"enabled","required":false,"in":"query","type":"string"},"rowFilter.model_registry.auto_managed":{"name":"auto_managed","required":false,"in":"query","type":"string"},"rowFilter.model_registry.auto_disabled":{"name":"auto_disabled","required":false,"in":"query","type":"string"},"rowFilter.model_registry.status":{"name":"status","required":false,"in":"query","type":"string"},"rowFilter.model_registry.listed_upstream":{"name":"listed_upstream","required":false,"in":"query","type":"string"},"rowFilter.model_registry.last_checked_at":{"name":"last_checked_at","required":false,"in":"query","type":"string"},"rowFilter.model_registry.last_ok_at":{"name":"last_ok_at","required":false,"in":"query","type":"string"},"rowFilter.model_registry.last_error":{"name":"last_error","required":false,"in":"query","type":"string"},"rowFilter.model_registry.last_http_status":{"name":"last_http_status","required":false,"in":"query","type":"string"},"rowFilter.model_registry.latency_ms":{"name":"latency_ms","required":false,"in":"query","type":"string"},"rowFilter.model_registry.consecutive_failures":{"name":"consecutive_failures","required":false,"in":"query","type":"string"},"rowFilter.model_registry.checks_total":{"name":"checks_total","required":false,"in":"query","type":"string"},"rowFilter.model_registry.checks_ok":{"name":"checks_ok","required":false,"in":"query","type":"string"},"rowFilter.model_registry.first_seen_at":{"name":"first_seen_at","required":false,"in":"query","type":"string"},"rowFilter.model_registry.retired_at":{"name":"retired_at","required":false,"in":"query","type":"string"},"rowFilter.model_registry.notes":{"name":"notes","required":false,"in":"query","type":"string"},"rowFilter.model_registry.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"rowFilter.model_registry.updated_at":{"name":"updated_at","required":false,"in":"query","type":"string"},"body.usage_events":{"name":"usage_events","description":"usage_events","required":false,"in":"body","schema":{"$ref":"#/definitions/usage_events"}},"rowFilter.usage_events.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.usage_events.user_id":{"name":"user_id","required":false,"in":"query","type":"string"},"rowFilter.usage_events.api_key_id":{"name":"api_key_id","required":false,"in":"query","type":"string"},"rowFilter.usage_events.model":{"name":"model","required":false,"in":"query","type":"string"},"rowFilter.usage_events.endpoint":{"name":"endpoint","required":false,"in":"query","type":"string"},"rowFilter.usage_events.prompt_tokens":{"name":"prompt_tokens","required":false,"in":"query","type":"string"},"rowFilter.usage_events.completion_tokens":{"name":"completion_tokens","required":false,"in":"query","type":"string"},"rowFilter.usage_events.total_tokens":{"name":"total_tokens","required":false,"in":"query","type":"string"},"rowFilter.usage_events.cost_usd":{"name":"cost_usd","required":false,"in":"query","type":"string"},"rowFilter.usage_events.status":{"name":"status","required":false,"in":"query","type":"string"},"rowFilter.usage_events.latency_ms":{"name":"latency_ms","required":false,"in":"query","type":"string"},"rowFilter.usage_events.source":{"name":"source","required":false,"in":"query","type":"string"},"rowFilter.usage_events.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"body.profiles":{"name":"profiles","description":"profiles","required":false,"in":"body","schema":{"$ref":"#/definitions/profiles"}},"rowFilter.profiles.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.profiles.email":{"name":"email","required":false,"in":"query","type":"string"},"rowFilter.profiles.full_name":{"name":"full_name","required":false,"in":"query","type":"string"},"rowFilter.profiles.role":{"name":"role","required":false,"in":"query","type":"string"},"rowFilter.profiles.plan":{"name":"plan","required":false,"in":"query","type":"string"},"rowFilter.profiles.stripe_customer_id":{"name":"stripe_customer_id","required":false,"in":"query","type":"string"},"rowFilter.profiles.credits_balance":{"name":"credits_balance","required":false,"in":"query","type":"string"},"rowFilter.profiles.status":{"name":"status","required":false,"in":"query","type":"string"},"rowFilter.profiles.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"rowFilter.profiles.updated_at":{"name":"updated_at","required":false,"in":"query","type":"string"},"body.subscriptions":{"name":"subscriptions","description":"subscriptions","required":false,"in":"body","schema":{"$ref":"#/definitions/subscriptions"}},"rowFilter.subscriptions.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.user_id":{"name":"user_id","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.stripe_subscription_id":{"name":"stripe_subscription_id","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.stripe_price_id":{"name":"stripe_price_id","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.plan":{"name":"plan","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.status":{"name":"status","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.current_period_start":{"name":"current_period_start","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.current_period_end":{"name":"current_period_end","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.cancel_at_period_end":{"name":"cancel_at_period_end","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"rowFilter.subscriptions.updated_at":{"name":"updated_at","required":false,"in":"query","type":"string"},"body.usage_current_month":{"name":"usage_current_month","description":"usage_current_month","required":false,"in":"body","schema":{"$ref":"#/definitions/usage_current_month"}},"rowFilter.usage_current_month.user_id":{"name":"user_id","required":false,"in":"query","type":"string"},"rowFilter.usage_current_month.requests":{"name":"requests","required":false,"in":"query","type":"string"},"rowFilter.usage_current_month.tokens":{"name":"tokens","required":false,"in":"query","type":"string"},"rowFilter.usage_current_month.cost_usd":{"name":"cost_usd","required":false,"in":"query","type":"string"},"body.contact_messages":{"name":"contact_messages","description":"contact_messages","required":false,"in":"body","schema":{"$ref":"#/definitions/contact_messages"}},"rowFilter.contact_messages.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.contact_messages.name":{"name":"name","required":false,"in":"query","type":"string"},"rowFilter.contact_messages.email":{"name":"email","required":false,"in":"query","type":"string"},"rowFilter.contact_messages.message":{"name":"message","required":false,"in":"query","type":"string"},"rowFilter.contact_messages.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"body.model_health_checks":{"name":"model_health_checks","description":"model_health_checks","required":false,"in":"body","schema":{"$ref":"#/definitions/model_health_checks"}},"rowFilter.model_health_checks.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.model_id":{"name":"model_id","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.ok":{"name":"ok","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.status":{"name":"status","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.http_status":{"name":"http_status","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.latency_ms":{"name":"latency_ms","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.error":{"name":"error","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.sample":{"name":"sample","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.trigger":{"name":"trigger","required":false,"in":"query","type":"string"},"rowFilter.model_health_checks.checked_at":{"name":"checked_at","required":false,"in":"query","type":"string"},"body.blog_posts":{"name":"blog_posts","description":"blog_posts","required":false,"in":"body","schema":{"$ref":"#/definitions/blog_posts"}},"rowFilter.blog_posts.id":{"name":"id","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.slug":{"name":"slug","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.title":{"name":"title","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.excerpt":{"name":"excerpt","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.content":{"name":"content","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.cover_image":{"name":"cover_image","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.tags":{"name":"tags","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.author_id":{"name":"author_id","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.author_name":{"name":"author_name","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.status":{"name":"status","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.published_at":{"name":"published_at","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.created_at":{"name":"created_at","required":false,"in":"query","type":"string"},"rowFilter.blog_posts.updated_at":{"name":"updated_at","required":false,"in":"query","type":"string"}},"externalDocs":{"description":"PostgREST Documentation","url":"https://postgrest.org/en/v14/references/api.html"}} \ No newline at end of file diff --git a/runq.sh b/runq.sh new file mode 100644 index 0000000..b41703e --- /dev/null +++ b/runq.sh @@ -0,0 +1,6 @@ +#!/bin/bash +cp /tmp/qs1.sql /tmp/qs2.sql /var/lib/postgresql/ 2>/dev/null +chown postgres:postgres /var/lib/postgresql/qs1.sql /var/lib/postgresql/qs2.sql 2>/dev/null +su postgres -c 'cd /var/lib/postgresql && psql -d newapi -A -t -f qs1.sql' +echo --- +su postgres -c 'cd /var/lib/postgresql && psql -d newapi -A -t -f qs2.sql' diff --git a/runq5.sh b/runq5.sh new file mode 100644 index 0000000..99bc3d3 --- /dev/null +++ b/runq5.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cp /tmp/qs5.sql /var/lib/postgresql/; chown postgres /var/lib/postgresql/qs5.sql +su postgres -c 'cd /var/lib/postgresql && psql -d newapi -A -t -f qs5.sql' diff --git a/runsql.sh b/runsql.sh new file mode 100644 index 0000000..48145fd --- /dev/null +++ b/runsql.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cp /tmp/add_speka.sql /var/lib/postgresql/ 2>/dev/null +chown postgres /var/lib/postgresql/add_speka.sql 2>/dev/null +su postgres -c 'cd /var/lib/postgresql && psql -d newapi -A -t -f add_speka.sql' diff --git a/shim.py b/shim.py new file mode 100644 index 0000000..0789068 --- /dev/null +++ b/shim.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python3 +"""OpenAI-compatible shim for Speka free keys ($1/mo per account, 10 rpm). +Rotation over bank.jsonl, dead on 401/403, cooldown on 429/quota-402. +ENV: SPEKA_BANK, SPEKA_PORT, SPEKA_UP +""" +import json, os, time, threading, urllib.request, urllib.error +from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler + +BANK = os.environ.get("SPEKA_BANK", "/opt/speka-shim/bank.jsonl") +PORT = int(os.environ.get("SPEKA_PORT", "8819")) +UP = os.environ.get("SPEKA_UP", "https://speka.me") +# short alias -> upstream model id +MAP = { + "speka-muse-glimmer": "meta/muse-glimmer-30b", + "speka-nemotron-ultra": "nvidia/nemotron-3-ultra-550b-a55b", + "speka-laguna-xs": "poolside/laguna-xs-2.1", + "speka-bolt": "nvidia/nemotron-3.5-bolt-e4b", + "speka-lightning": "nvidia/nemotron-3.5-lightning-30b-a3b", + "speka-step5": "stepfun-ai/step-5-preview", + "speka-llama-vision": "meta/llama-3.2-90b-vision-instruct", +} +lock = threading.Lock() +state = {"keys": [], "idx": 0, "dead": {}, "cool": {}} + + +def load(): + keys = [] + try: + for line in open(BANK, encoding="utf-8"): + line = line.strip() + if not line: + continue + try: + d = json.loads(line) + except Exception: + continue + k = d.get("key") + if k and d.get("ok", True): + keys.append(k) + except FileNotFoundError: + pass + with lock: + state["keys"] = keys + return keys + + +def pick(): + with lock: + keys = state["keys"] + now = time.time() + if not keys: + return None + for _ in range(len(keys)): + state["idx"] = (state["idx"] + 1) % len(keys) + k = keys[state["idx"]] + if state["dead"].get(k): + continue + if state["cool"].get(k, 0) > now: + continue + return k + return None + + +def mark(k, code, body=b""): + with lock: + if code in (401, 403): + state["dead"][k] = True + elif code == 429: + state["cool"][k] = time.time() + 60 + elif code == 402: + # monthly $1 allowance exhausted -> park until monthly reset/restart + state["dead"][k] = True + elif code == 400 and b"insufficient" in body.lower(): + state["dead"][k] = True + + +class H(BaseHTTPRequestHandler): + protocol_version = "HTTP/1.1" + + def log_message(self, *a): + pass + + def _send(self, code, obj, ctype="application/json"): + b = obj if isinstance(obj, bytes) else json.dumps(obj).encode() + self.send_response(code) + self.send_header("Content-Type", ctype) + self.send_header("Content-Length", str(len(b))) + self.end_headers() + try: + self.wfile.write(b) + except Exception: + pass + + def do_GET(self): + if self.path.startswith("/v1/models"): + return self._send(200, {"object": "list", "data": [ + {"id": a, "object": "model", "owned_by": "speka", "root": m} for a, m in MAP.items() + ]}) + if self.path.startswith("/health"): + return self._send(200, {"keys": len(state["keys"]), "dead": len(state["dead"]), + "cool": len(state["cool"])}) + return self._send(404, {"error": "not found"}) + + def do_POST(self): + n = int(self.headers.get("Content-Length") or 0) + body = self.rfile.read(n) if n else b"" + if not self.path.startswith("/v1/chat/completions") and not self.path.startswith("/v1/embeddings"): + return self._send(404, {"error": "not found"}) + try: + _j = json.loads(body.decode() or "{}") + except Exception: + _j = {} + if _j.get("model") in MAP: + _j["model"] = MAP[_j["model"]] + body = json.dumps(_j).encode() + last = None + for _ in range(4): + key = pick() + if not key: + return self._send(503, {"error": {"message": "speka pool exhausted", "type": "no_keys"}}) + req = urllib.request.Request(UP + self.path, data=body, method="POST") + req.add_header("Content-Type", "application/json") + req.add_header("Authorization", "Bearer " + key) + try: + r = urllib.request.urlopen(req, timeout=180) + ctype = r.headers.get("Content-Type", "application/json") + if "text/event-stream" in ctype: + self.send_response(200) + self.send_header("Content-Type", ctype) + self.send_header("Cache-Control", "no-cache") + self.send_header("Connection", "close") + self.end_headers() + try: + while True: + chunk = r.read(1024) + if not chunk: + break + self.wfile.write(chunk) + self.wfile.flush() + except Exception: + pass + return + data = r.read() + self.send_response(200) + self.send_header("Content-Type", ctype) + self.send_header("Content-Length", str(len(data))) + self.end_headers() + self.wfile.write(data) + return + except urllib.error.HTTPError as e: + data = e.read() + mark(key, e.code, data) + last = (e.code, data) + if e.code in (400, 404, 422): + # real request error, not key issue + self.send_response(e.code) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(data))) + self.end_headers() + self.wfile.write(data) + return + continue + except Exception as e: + last = (500, str(e).encode()) + continue + code, data = last or (502, b'{"error":"upstream failed"}') + self.send_response(code if code >= 400 else 502) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(data))) + self.end_headers() + self.wfile.write(data) + + +if __name__ == "__main__": + load() + threading.Thread(target=lambda: [time.sleep(30) or load() for _ in iter(int, 1)], daemon=True).start() + print("speka-shim on :%d keys=%d" % (PORT, len(state["keys"])), flush=True) + ThreadingHTTPServer(("127.0.0.1", PORT), H).serve_forever() \ No newline at end of file diff --git a/speka-shim.service b/speka-shim.service new file mode 100644 index 0000000..8fc713a --- /dev/null +++ b/speka-shim.service @@ -0,0 +1,14 @@ +[Unit] +Description=Speka.me OpenAI-compatible shim +After=network.target + +[Service] +Type=simple +Environment=SPEKA_BANK=/opt/speka-shim/bank.jsonl +Environment=SPEKA_PORT=8819 +ExecStart=/usr/bin/python3 /opt/speka-shim/shim.py +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/speka_farm.py b/speka_farm.py new file mode 100644 index 0000000..741fb07 --- /dev/null +++ b/speka_farm.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 +"""Speka.me autoreg: Supabase signup -> session cookie -> API key. Bank jsonl.""" +import os, sys, json, time, base64, random, string, argparse, threading +import requests + +HERE = os.path.dirname(os.path.abspath(__file__)) +SUPA = "https://supabase-speka.srv1729373.hstgr.cloud" +API = "https://speka.me" +ANON = open(os.path.join(HERE, "anon.txt")).read().strip() +BANK = os.path.join(HERE, "bank.jsonl") +PASSWORD = "Speka!2026xQ" + +BASE_EMAIL_DOMAIN = "gmail.com" + +_lock = threading.Lock() + + +def log(*a): + s = " ".join(str(x) for x in a) + print(s, flush=True) + + +def gen_tag(): + return "".join(random.choice(string.ascii_lowercase + string.digits) for _ in range(6)) + + +def make_session_cookie(sess): + obj = { + "access_token": sess["access_token"], + "token_type": sess.get("token_type", "bearer"), + "expires_in": sess.get("expires_in", 3600), + "expires_at": sess.get("expires_at"), + "refresh_token": sess["refresh_token"], + "user": sess["user"], + } + raw = json.dumps(obj, separators=(",", ":"), ensure_ascii=False).encode() + return "base64-" + base64.b64encode(raw).decode() + + +def signup(email, proxy=None): + p = {"http": proxy, "https": proxy} if proxy else None + r = requests.post( + SUPA + "/auth/v1/signup", + headers={"apikey": ANON, "content-type": "application/json"}, + json={"email": email, "password": PASSWORD}, + proxies=p, timeout=40, + ) + if r.status_code != 200: + return None, f"signup_{r.status_code}:{r.text[:160]}" + try: + d = r.json() + except Exception: + return None, "signup_badjson" + if not d.get("access_token"): + return None, "signup_no_token:" + str(d)[:160] + return d, None + + +def create_key(sess, proxy=None): + p = {"http": proxy, "https": proxy} if proxy else None + ck = "sb-supabase-speka-auth-token=" + make_session_cookie(sess) + r = requests.post( + API + "/api/keys", + headers={"content-type": "application/json", "cookie": ck, + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/145.0"}, + json={"name": "k1"}, + proxies=p, timeout=40, + ) + if r.status_code != 200: + return None, f"key_{r.status_code}:{r.text[:160]}" + d = r.json() + k = d.get("key") + if not k: + return None, "key_empty" + return k, None + + +def check_key(key, proxy=None): + p = {"http": proxy, "https": proxy} if proxy else None + r = requests.get(API + "/v1/models", headers={"Authorization": "Bearer " + key}, + proxies=p, timeout=30) + return r.status_code, len(r.json().get("data", [])) if r.status_code == 200 else 0 + + +def one(idx, prefix, proxy=None): + tag = "%s%03d%s" % (prefix, idx, gen_tag()[:3]) + email = "baradok609+%s@%s" % (tag, BASE_EMAIL_DOMAIN) + sess, err = signup(email, proxy) + if err: + return {"email": email, "ok": False, "err": err} + key, err = create_key(sess, proxy) + if err: + return {"email": email, "ok": False, "err": err} + st, nmod = check_key(key, proxy) + rec = {"email": email, "password": PASSWORD, "key": key, "ok": st == 200, + "models": nmod, "ts": int(time.time()), + "access_token": sess["access_token"], "refresh_token": sess["refresh_token"]} + if st != 200: + rec["err"] = "probe_%d" % st + return rec + + +def worker(ids, prefix, proxies, out): + for i in ids: + px = None + if proxies: + px = random.choice(proxies) + try: + rec = one(i, prefix, px) + except Exception as e: + rec = {"idx": i, "ok": False, "err": "exc:" + repr(e)[:120]} + with _lock: + out.append(rec) + with open(BANK, "a", encoding="utf-8") as f: + f.write(json.dumps(rec, ensure_ascii=False) + "\n") + log(("OK " if rec.get("ok") else "ERR") + " " + str(rec.get("email")) + " " + + (("models=%s" % rec.get("models")) if rec.get("ok") else str(rec.get("err"))[:90])) + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("n", type=int) + ap.add_argument("--workers", "-w", type=int, default=4) + ap.add_argument("--start", type=int, default=1) + ap.add_argument("--prefix", default="spk") + ap.add_argument("--proxies", default="") + a = ap.parse_args() + proxies = [x.strip() for x in a.proxies.split(",") if x.strip()] + ids = list(range(a.start, a.start + a.n)) + chunks = [ids[i::a.workers] for i in range(a.workers)] + out = [] + ths = [threading.Thread(target=worker, args=(c, a.prefix, proxies, out)) for c in chunks if c] + t0 = time.time() + for t in ths: + t.start() + for t in ths: + t.join() + ok = sum(1 for r in out if r.get("ok")) + log("=== done: %d/%d ok in %.0fs ===" % (ok, len(out), time.time() - t0)) + + +if __name__ == "__main__": + sys.exit(main()) \ No newline at end of file diff --git a/speka_status.py b/speka_status.py new file mode 100644 index 0000000..309a6c5 --- /dev/null +++ b/speka_status.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python3 +"""Speka pool status: login -> usage_current_month -> cost_usd, rebuild live pool.""" +import os, sys, json, time, threading, argparse +import requests + +HERE = os.path.dirname(os.path.abspath(__file__)) +SUPA = "https://supabase-speka.srv1729373.hstgr.cloud" +ANON = open(os.path.join(HERE, "anon.txt")).read().strip() +BANK = os.path.join(HERE, "bank.jsonl") +LIVE = os.path.join(HERE, "pool_live.jsonl") +STATUS = os.path.join(HERE, "pool_status.jsonl") +LIMIT = 1.0 +_lock = threading.Lock() + + +def log(*a): + print(" ".join(str(x) for x in a), flush=True) + + +def one(rec): + email, pw = rec["email"], rec["password"] + try: + r = requests.post(SUPA + "/auth/v1/token?grant_type=password", + headers={"apikey": ANON, "content-type": "application/json"}, + json={"email": email, "password": pw}, timeout=40) + if r.status_code != 200: + return {"email": email, "ok": False, "err": "login_%d" % r.status_code, "cost": None} + at = r.json()["access_token"] + u = requests.get(SUPA + "/rest/v1/usage_current_month?select=cost_usd,requests,tokens", + headers={"apikey": ANON, "Authorization": "Bearer " + at}, timeout=40) + cost = 0.0 + reqs = 0 + if u.status_code == 200 and u.json(): + d = u.json()[0] + cost = float(d.get("cost_usd") or 0) + reqs = int(d.get("requests") or 0) + return {"email": email, "ok": True, "cost": cost, "requests": reqs, + "left": round(LIMIT - cost, 4), "key": rec.get("key"), "err": None} + except Exception as e: + return {"email": email, "ok": False, "err": "exc:" + repr(e)[:80], "cost": None} + + +def worker(rows, out): + for rec in rows: + r = one(rec) + r["ts"] = int(time.time()) + with _lock: + out.append(r) + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("-w", "--workers", type=int, default=6) + ap.add_argument("--limit", type=float, default=LIMIT) + a = ap.parse_args() + recs = {} + for line in open(BANK, encoding="utf-8"): + line = line.strip() + if not line: + continue + try: + d = json.loads(line) + except Exception: + continue + if d.get("key"): + recs[d["email"]] = d + rows = list(recs.values()) + log("checking %d accounts" % len(rows)) + out = [] + chunks = [rows[i::a.workers] for i in range(a.workers)] + ths = [threading.Thread(target=worker, args=(c, out)) for c in chunks if c] + t0 = time.time() + for t in ths: + t.start() + for t in ths: + t.join() + with open(STATUS, "w", encoding="utf-8") as f: + for r in out: + f.write(json.dumps(r, ensure_ascii=False) + "\n") + live = [r for r in out if r.get("ok") and (r.get("cost") or 0) < a.limit] + with open(LIVE, "w", encoding="utf-8") as f: + for r in live: + f.write(json.dumps({"email": r["email"], "key": r["key"], "ok": True, + "cost": r["cost"], "left": r["left"]}, ensure_ascii=False) + "\n") + total_left = sum(r["left"] for r in live if r.get("left")) + log("=== live=%d/%d spent_to_now=$%.4f left=$%.2f in %.0fs ===" % + (len(live), len(out), sum((r.get("cost") or 0) for r in out), total_left, time.time() - t0)) + + +if __name__ == "__main__": + sys.exit(main()) \ No newline at end of file