Tushen ilimi Wasanni
Balance, top-ups da keys
Duba abin da kake da, top up a kan Lightning, top up automatically daga your own wallet, duba abin da kowane tambayoyi kudin, da kuma sarrafa keys daga code.
An fassara wannan shafin na inji don dacewa. Asalin Ingilishi shine sigar da ke aiki.
Ƙirƙirar Balance
Duk da kudi, da kuma da yawa daga wannan key's cap ne amfani.
GET https://nymbot.ai/api/v1/credits/balance - Yana bukatar wani API key. POST tambaya, ga abokan ciniki wanda ya zo shi.
balance shi ne biyu kudin ciki a dolara a cikin yanzu Bitcoin farashin, ga kayan aiki da ke neman wani yawanci (null idan farashin ba za a iya karantawa). The rest ne a cikin credits da sats, wanda shi ne kamar yadda kudi suna daidai. key ya nuna key wanda ya ce. A key wanda ya samu ta cap zai iya duba kudin.
Yanzu
{
"balance": 49.18,
"balance_sats": 42037,
"standard": { "credits": 120.4, "sats": 1204 },
"pro": { "credits": 408.33, "sats": 40833 },
"key": {
"id": "4f0c9a1be27d3856",
"name": "laptop scripts",
"limit_sats": 20000,
"period_used_sats": 3412,
"total_used_sats": 18230,
"reset_period": "monthly",
"reset_at": "2026-10-01T00:00:00Z"
}
}
| takardar kebantawa | Kada |
|---|---|
401 | The key ne m, unknown, daidaita ko dacewa. |
cURL
curl https://nymbot.ai/api/v1/credits/balance \
-H "Authorization: Bearer $NYMBOT_API_KEY"
Python
import os
import requests
res = requests.get(
"https://nymbot.ai/api/v1/credits/balance",
headers={"Authorization": "Bearer " + os.environ["NYMBOT_API_KEY"]},
)
balance = res.json()
print(balance["standard"]["sats"], balance["pro"]["sats"])
JavaScript
const res = await fetch("https://nymbot.ai/api/v1/credits/balance", {
headers: { "Authorization": "Bearer " + process.env.NYMBOT_API_KEY },
});
const balance = await res.json();
console.log(balance.standard.sats, balance.pro.sats);
Takardar kebantawa
Ta yaya za ka iya top up, da kuma limits. Lightning ne kawai method.
GET https://nymbot.ai/api/v1/topup/payment-methods Duk da haka, ba za a bukatar key.
A top-up ne 10 zuwa 1,000,000 sats; a Pro top-up ya kamata a samuwa wani Pro credit, don haka yana fara a 100 sats. bulk_bonus lists bonus a kan manyan top-ups, kamar yadda a cikin app: 10%, 15% ko 20% more a kan standard top-ups daga 500, 1,000 ko 5,000 sats, kuma a kan Pro top-ups daga 5,000, 10,000 ko 50,000 sats.
Yanzu
{
"supported_methods": [
{
"method": "btc-lightning",
"display_name": "Bitcoin Lightning",
"supported_currencies": ["SATS", "USD", "BTC"],
"limits": {
"SATS": { "min": 10, "max": 1000000 },
"USD": { "min": 0.02, "max": 1170 },
"BTC": { "min": 1e-7, "max": 0.01 }
},
"tiers": ["standard", "pro"],
"default_tier": "pro",
"tier_min_sats": { "standard": 10, "pro": 100 },
"sats_per_credit": { "standard": 10, "pro": 100 },
"bulk_bonus": [
{ "bonus": 0.1, "standard_sats": 500, "pro_sats": 5000 },
{ "bonus": 0.15, "standard_sats": 1000, "pro_sats": 10000 },
{ "bonus": 0.2, "standard_sats": 5000, "pro_sats": 50000 }
]
}
]
}
cURL
curl https://nymbot.ai/api/v1/topup/payment-methods
Python
import requests
methods = requests.get("https://nymbot.ai/api/v1/topup/payment-methods").json()
print(methods["supported_methods"][0]["limits"])
JavaScript
const methods = await (await fetch("https://nymbot.ai/api/v1/topup/payment-methods")).json();
console.log(methods.supported_methods[0].limits);
Ƙararrawa a kan Lightning
Yadda za a samar da Lightning inji wanda ya ƙirƙirar credit zuwa nym da key yana da. Pay shi daga kowane Lightning wallet, sa'an nan Sauke shi Za ka iya ƙirƙirar kredit.
POST https://nymbot.ai/api/v1/topup/create/btc-lightning - Yana bukatar wani API key.
| Wasanni | Ƙananan | Tuntube | Tuntube mu |
|---|---|---|---|
amount | Sabuwar | Ee | Ta yaya, a cikin currency. A cikakken yawan ga sats. |
currency | Tuntube mu | ko | SATS (Ayyuka da ƙarfi) USD ko BTC. Dollars suna canza a cikin yanzu Bitcoin farashin. |
tier | Tuntube mu | ko | pro (The default) ko standard: wanda balance da aka ba da kredit. |
A standard credit ne 10 sats da Pro credit 100 sats, plus wani bulk bonus;
credits ya ce abin da aka ƙunshi wannan inji.
Yanzu
{
"invoice_id": "b7d41e0c95a2f38e6c1d0e9a4b7f2c61d3e8a05f9b2c4d7e1a6f3b8c0d5e2a9f4",
"payment_request": "lnbc100u1p5...",
"amount_sats": 10000,
"credits": 115,
"tier": "pro",
"expires_at": "2026-09-30T09:27:00Z",
"status": "pending"
}
| takardar kebantawa | Kada |
|---|---|
400 | Other method in the path (unsupported_method), wani ban sha'awa (unsupported_currency) ko mataki, wani ƙarfi, ko wani ƙarfi fiye da ƙarfi (amount_too_small), fiye da 1,000,000 tsabar kudi (amount_too_large) ko yaushe ta Lightning wallet (amount_out_of_range). |
429 | fiye da 60 sayarwa ga wannan nym, ko 120 daga wannan adireshin, a kowace rana (rate_limit_exceededƘaddamar Retry-After). |
502 | Duk da haka, ba za a iya sauke takardar shaida a yanzu (invoice_unavailableƘaddamar Retry-After). |
cURL
curl https://nymbot.ai/api/v1/topup/create/btc-lightning \
-H "Authorization: Bearer $NYMBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"amount": 10000, "currency": "SATS", "tier": "pro"}'
Python
import os
import requests
res = requests.post(
"https://nymbot.ai/api/v1/topup/create/btc-lightning",
headers={"Authorization": "Bearer " + os.environ["NYMBOT_API_KEY"]},
json={"amount": 10000, "currency": "SATS", "tier": "pro"},
)
invoice = res.json()
print(invoice["payment_request"])
JavaScript
const res = await fetch("https://nymbot.ai/api/v1/topup/create/btc-lightning", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.NYMBOT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ amount: 10000, currency: "SATS", tier: "pro" }),
});
const invoice = await res.json();
console.log(invoice.payment_request);
Sauke wani top-up
Ya ce idan inji da aka bayar da kuma, a lokacin da yana da, ya sa da kredit. Checking ne abin da ya rubuta shi, don haka bayan bayar, duba har zuwa status ne creditedSaboda haka, za ka iya samun daidai da za ka iya samun daidai da za ka iya samun daidai.
GET https://nymbot.ai/api/v1/topup/status/{invoice_id} - bukatar key daga nym wanda ya samar da inji.
status Ya pending (Baya ba za a bayar), paid (sanyaya, amma ba ya rubuta har yanzu; duba wani lokaci), credited (a kan your balance) ko expired (Nai ba za a biya a lokaci). The balances fields ne ga mataki da aka karfafawa.
Yanzu
{
"invoice_id": "b7d41e0c95a2f38e6c1d0e9a4b7f2c61d3e8a05f9b2c4d7e1a6f3b8c0d5e2a9f4",
"status": "credited",
"amount_sats": 10000,
"credits": 115,
"tier": "pro",
"expires_at": null,
"balance_credits": 523.33,
"balance_sats": 52333
}
| takardar kebantawa | Kada |
|---|---|
400 | ID ba shi ne 64-karfe id daga yarjejeniya. |
404 | No invoice by that id for your nym (invoice_not_found). |
cURL
curl https://nymbot.ai/api/v1/topup/status/$INVOICE_ID \
-H "Authorization: Bearer $NYMBOT_API_KEY"
Python
import os, time
import requests
headers = {"Authorization": "Bearer " + os.environ["NYMBOT_API_KEY"]}
url = "https://nymbot.ai/api/v1/topup/status/" + invoice["invoice_id"]
while True:
status = requests.get(url, headers=headers).json()["status"]
if status in ("credited", "expired"):
break
time.sleep(3)
print(status)
JavaScript
const headers = { "Authorization": "Bearer " + process.env.NYMBOT_API_KEY };
const url = "https://nymbot.ai/api/v1/topup/status/" + invoice.invoice_id;
let status;
do {
await new Promise((r) => setTimeout(r, 3000));
status = (await (await fetch(url, { headers })).json()).status;
} while (status !== "credited" && status !== "expired");
console.log(status);
Tsarin Tarihi
One line per request: abin da ya zama, abin da model, da yawa tokens da kuma abin da ya dace. Duk da haka ba za a sauke baƙi ko matsaloli, don haka ba za a sauke baƙi. Rows za a sauke a kan 90 kwanaki, latest farko. A key da ya zama a kan cap ba za a iya ko dai sauransu sauke tarihinsa.
GET https://nymbot.ai/api/v1/queries/history — ake bukata wani API key, wanda ya nuna hanyoyinsa, ko Takaddun shaida daga your nym, wanda ya nuna kowane key.
| Wasanni | Ƙananan | Tuntube | Tuntube mu |
|---|---|---|---|
page | Ƙananan (Query) | ko | Default 1, a karkashin 1,000; a karkashin shafi ne 400 invalid_value. |
page_count | Ƙananan (Query) | ko | Rows per page. Default 20, a karkashin 100. |
start_dateend_date | Wasanni (Query) | ko | ISO 8601 dates ko lokaci. |
model | Wasanni (Query) | ko | kawai wannan model. |
type | Wasanni (Query) | ko | chat, responses, messages, image, video, speech, transcription ko embedding. |
all_keys | Ƙungiyoyi (Query) | ko | tare da wani key: true yana hada da dukkan key na sama nym. Default false. |
key_id | Wasanni (Query) | ko | tare da wani takardar shaida, ko tare da all_keys=true: kawai wannan key. |
Yanzu
{
"data": [
{
"id": "q_71c4e9a0",
"timestamp": "2026-09-30T08:12:00Z",
"model": "anthropic/claude-sonnet-5",
"type": "chat",
"input_tokens": 1240,
"output_tokens": 380,
"cached_tokens": 0,
"cost_sats": 16.2,
"cost_usd": 0.01895,
"balance": "pro",
"key_id": "4f0c9a1be27d3856",
"web_search": false,
"status": "ok"
}
],
"pagination": { "page": 1, "page_count": 20, "total": 311, "total_pages": 16 }
}
cURL
curl "https://nymbot.ai/api/v1/queries/history?page_count=50&type=chat" \
-H "Authorization: Bearer $NYMBOT_API_KEY"
Python
import os
import requests
res = requests.get(
"https://nymbot.ai/api/v1/queries/history",
headers={"Authorization": "Bearer " + os.environ["NYMBOT_API_KEY"]},
params={"page_count": 50, "type": "chat"},
)
for row in res.json()["data"]:
print(row["timestamp"], row["model"], row["cost_sats"])
JavaScript
const res = await fetch("https://nymbot.ai/api/v1/queries/history?page_count=50&type=chat", {
headers: { "Authorization": "Bearer " + process.env.NYMBOT_API_KEY },
});
for (const row of (await res.json()).data) console.log(row.timestamp, row.model, row.cost_sats);
Takaddun shaida
Yadda za a yi, canza da canza keys, account summary da kuma automatic top-ups ba za a yi wani API key. Suna za a yi ashirin daga your nym, don haka wani leken key za a iya canza up to ta cap amma ba zai iya ba da wani key ko rage ta cap.
The app yana yi wannan ga ku: duk a cikin Wasanni sheet yana amfani da wadannan endpoints. Za ka kawai bukatar wannan sassa don canza keys daga code.
Takaddun shaida ne wani matsaloli na Nostr na irin 27235 (NIP-98), an ba da bas64-coded a cikin
Authorization Header tare da Littafi Nostr Yanar Gizo:
Ƙananan
{
"kind": 27235,
"created_at": 1790726400,
"tags": [
["u", "https://nymbot.ai/api/v1/keys"],
["method", "POST"],
["nonce", "9c4e21f07a3b...16 random bytes in hex"],
["payload", "3f1a0d7c8e2b...sha256 of the exact request body in hex"]
],
"content": "",
"pubkey": "your public key in hex",
"id": "...",
"sig": "..."
}
ushi ne cikakken URL na tambayoyi, tambayoyi string da aka ƙunshi, kamar yadda ya saita.methodYana da HTTP Method.payloadshi ne SHA-256 na kayan shaida, a hex. Yana da ake bukata a kanPOSTkumaPATCH, da kuma jiki ka sa ya kamata a zama byte ga byte wanda ka hashe.created_atza a iya zama a cikin 60 seconds daga watsawa na server.- Kowane matsaloli yana aiki daya, a
GETtambaya, don haka wani header da aka saita ba za a iya saita. Sanyaya wani sabon don kowane baƙi. Add anoncetag tare da wani alama don haka biyu abokin ciniki da aka ƙirƙirƙirar a cikin wannan sekun. - The body of a signed request za a iya zama fiye da 64 KB, kuma wani body ne
Content-Type: application/json.
The missing event ya dace 401 missing_nostr_auth; daya da aka ƙunshi, da aka ƙunshi, da yawa, ko don wani daban-daban URL, method ko body returns
invalid_nostr_auth, tare da alama a cikin alama; a reused one returns
nostr_auth_replayed. A API key send to these endpoints ne daidaita. Takaddun shaida kafin ruwan da aka saita, kuma kowane adireshin za a iya ba da shi 30 times a minti (a IPv6 adireshin aka sayar da cikakken /64); bayan haka an samu 429 Ƙaddamar
Retry-After.
Browsers za a iya kira wadannan endpoints kawai daga sites na Nymbot (https://nymbot.ai,
https://nymchat.app Shafin shafi na wani shafin yanar gizon yana ba tare da wani CORS headers, don haka ba za a iya karanta abin da suka yi.
OriginKuma ba za a ci gaba.
Takaddun shaida bukatar your nym's secret key (The nsec), wanda ya ƙirƙirar dukkanni: asalinka, tarihi, da asalinka. kawai sa shi a cikin script a kan wani na'urorin da ka yi imani, sa shi daga yanayi fitar da shi a cikin fayil, da kuma so app a lokacin da za ka iya.
Wadannan masu taimakawa suna gina header. Kasuwanci a wannan shafin yana amfani da su. Suna karanta key a hex daga NOSTR_SECRET_HEX; da cURL daya amfani da
Nemo command-line kayan aiki, wanda ya samu nsec ko hex key, da kuma sha256sum a cikin macOS, shasum -a 256).
cURL
nostr_auth() {
method="$1"; url="$2"; body="$3"
nonce=$(openssl rand -hex 16)
if [ -n "$body" ]; then
hash=$(printf '%s' "$body" | sha256sum | cut -d' ' -f1)
event=$(nak event --sec "$NOSTR_SECRET_HEX" -k 27235 -t "u=$url" -t "method=$method" -t "nonce=$nonce" -t "payload=$hash")
else
event=$(nak event --sec "$NOSTR_SECRET_HEX" -k 27235 -t "u=$url" -t "method=$method" -t "nonce=$nonce")
fi
printf 'Nostr %s' "$(printf '%s' "$event" | base64 | tr -d '\n')"
}
Python
# pip install coincurve requests
import base64, hashlib, json, os, time
from coincurve import PrivateKey, PublicKeyXOnly
SECRET = bytes.fromhex(os.environ["NOSTR_SECRET_HEX"])
def nostr_auth(method, url, body=b""):
pubkey = PublicKeyXOnly.from_secret(SECRET).format().hex()
tags = [["u", url], ["method", method], ["nonce", os.urandom(16).hex()]]
if body:
tags.append(["payload", hashlib.sha256(body).hexdigest()])
created_at = int(time.time())
serialized = json.dumps([0, pubkey, created_at, 27235, tags, ""], separators=(",", ":"), ensure_ascii=False)
event_id = hashlib.sha256(serialized.encode()).digest()
event = {
"id": event_id.hex(),
"pubkey": pubkey,
"created_at": created_at,
"kind": 27235,
"tags": tags,
"content": "",
"sig": PrivateKey(SECRET).sign_schnorr(event_id).hex(),
}
return "Nostr " + base64.b64encode(json.dumps(event).encode()).decode()
JavaScript
// npm install nostr-tools
import { createHash, randomBytes } from "node:crypto";
import { finalizeEvent } from "nostr-tools/pure";
const secret = Buffer.from(process.env.NOSTR_SECRET_HEX, "hex");
export function nostrAuth(method, url, body = "") {
const tags = [["u", url], ["method", method], ["nonce", randomBytes(16).toString("hex")]];
if (body) tags.push(["payload", createHash("sha256").update(body).digest("hex")]);
const event = finalizeEvent(
{ kind: 27235, created_at: Math.floor(Date.now() / 1000), tags, content: "" },
secret,
);
return "Nostr " + Buffer.from(JSON.stringify(event)).toString("base64");
}
Sauke Account
What app's API sheet ya nuna a ƙasa: your public key, biyu balances, da yawa keys ne ajiya (kowane da aka haifar da ko dacewa), da kuma takardar kebantawa takardar shaida, ko
null a lokacin da server ba ya samar da su.
GET https://nymbot.ai/api/v1/account Ƙungiyar A Takaddun shaida.
Yanzu
{
"data": {
"pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
"balances": {
"standard": { "credits": 120.4, "sats": 1204 },
"pro": { "credits": 408.33, "sats": 40833 }
},
"keys_active": 3,
"nwc_auto_topup": {
"connected": true, "threshold_sats": 5000, "topup_sats": 20000, "tier": "pro",
"last_topup_at": null, "last_topup_sats": null, "last_error": null
}
}
}
cURL
URL=https://nymbot.ai/api/v1/account
curl "$URL" -H "Authorization: $(nostr_auth GET "$URL")"
Python
import requests
url = "https://nymbot.ai/api/v1/account"
print(requests.get(url, headers={"Authorization": nostr_auth("GET", url)}).json())
JavaScript
const url = "https://nymbot.ai/api/v1/account";
const res = await fetch(url, { headers: { "Authorization": nostrAuth("GET", url) } });
console.log(await res.json());
Shafin shafi: Key
Endpoints bayan app key list. Duk da su bukatar wani Takaddun shaidaKowane keyword ya sa a cikin wannan form, tare da lokaci a ISO 8601 da yawa a sats:
Ƙararrawa
{
"id": "4f0c9a1be27d3856",
"name": "laptop scripts",
"hint": "sk-nymbot-Qm7x…c2Lw",
"limit_sats": 20000,
"reset_period": "monthly",
"reset_at": "2026-10-01T00:00:00Z",
"expire_at": null,
"period_used_sats": 3412,
"total_used_sats": 18230,
"created_at": "2026-08-14T09:21:07Z",
"updated_at": "2026-09-02T17:40:55Z",
"last_used_at": "2026-09-30T08:12:00Z",
"revoked_at": null
}
hint Yana da kaddamar da key, amma ba za a yi amfani da shi. The key ya zama kawai daya, a lokacin da ya yi.
Takardar kebantawa
GET https://nymbot.ai/api/v1/keys Ƙaddamarwa
| Wasanni | Ƙananan | Tuntube | Tuntube mu |
|---|---|---|---|
include_revoked | Ƙungiyoyi (Query) | ko | Ƙaddamar da keys. Default false. |
Yanzu
{ "data": [ { "id": "4f0c9a1be27d3856", "name": "laptop scripts", "hint": "sk-nymbot-Qm7x…c2Lw", "...": "..." } ] }
cURL
URL=https://nymbot.ai/api/v1/keys
curl "$URL" -H "Authorization: $(nostr_auth GET "$URL")"
Python
import requests
url = "https://nymbot.ai/api/v1/keys"
for key in requests.get(url, headers={"Authorization": nostr_auth("GET", url)}).json()["data"]:
print(key["id"], key["name"], key["period_used_sats"], key["limit_sats"])
JavaScript
const url = "https://nymbot.ai/api/v1/keys";
const { data } = await (await fetch(url, { headers: { "Authorization": nostrAuth("GET", url) } })).json();
for (const key of data) console.log(key.id, key.name, key.period_used_sats, key.limit_sats);
Yadda za a yi key
POST https://nymbot.ai/api/v1/keys Ƙaddamarwa. Ƙaddamarwa 201.
| Wasanni | Ƙananan | Tuntube | Tuntube mu |
|---|---|---|---|
name | Tuntube mu | Ee | 1 zuwa 40 alama, daban-daban daga sauran yanar gizo (tallace kudi). |
limit_sats | Tuntube | ko | The spending cap a sats, a ko'ina 1. Duba shi a kan ba tare da cap. |
reset_period | Tuntube mu | ko | daily, weekly ko monthlyƘananan limit_sats. Duba shi a kan ajiya wanda ba zai ba da sauri. |
expire_at | string ko integer | ko | Kada keyword ya fara aiki: wani ISO 8601 lokaci, ko milliseconds tun 1970. |
Tuntube Mu (201)
{
"data": {
"id": "4f0c9a1be27d3856",
"name": "laptop scripts",
"hint": "sk-nymbot-Qm7x…c2Lw",
"limit_sats": 20000,
"reset_period": "monthly",
"key": "sk-nymbot-Qm7x...c2Lw",
"...": "the rest of the key object"
}
}
| takardar kebantawa | Kada |
|---|---|
400 | Ƙararrawa ko ƙararrawa mai girma; mai amfani da sunan (duplicate_name); wani cap cewa ba ne wani cikakken yawan ba tare da 1; wani reset tsawon ba tare da wani cap; wani matsa lissafi a cikin gabatarwa; wani yanki ba (unknown_parameter); ko 25 active keys yanzu (too_many_keys). |
429 | fiye da 60 keys da wannan nym, ko 120 daga wannan adireshin, a kowace rana (rate_limit_exceededƘaddamar Retry-After). |
cURL
URL=https://nymbot.ai/api/v1/keys
BODY='{"name":"laptop scripts","limit_sats":20000,"reset_period":"monthly"}'
curl "$URL" \
-H "Authorization: $(nostr_auth POST "$URL" "$BODY")" \
-H "Content-Type: application/json" \
-d "$BODY"
Python
import json
import requests
url = "https://nymbot.ai/api/v1/keys"
body = json.dumps({"name": "laptop scripts", "limit_sats": 20000, "reset_period": "monthly"}).encode()
res = requests.post(
url,
data=body,
headers={"Authorization": nostr_auth("POST", url, body), "Content-Type": "application/json"},
)
print(res.json()["data"]["key"])
JavaScript
const url = "https://nymbot.ai/api/v1/keys";
const body = JSON.stringify({ name: "laptop scripts", limit_sats: 20000, reset_period: "monthly" });
const res = await fetch(url, {
method: "POST",
headers: { "Authorization": nostrAuth("POST", url, body), "Content-Type": "application/json" },
body,
});
console.log((await res.json()).data.key);
Shafin shafi: One Key
GET https://nymbot.ai/api/v1/keys/{id} Ƙaddamarwa
Tuntube {"data": {…}} tare da key object, ko 404
key_not_found idan wani key na your yana da wannan id.
cURL
URL=https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856
curl "$URL" -H "Authorization: $(nostr_auth GET "$URL")"
Python
import requests
url = "https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856"
print(requests.get(url, headers={"Authorization": nostr_auth("GET", url)}).json()["data"])
JavaScript
const url = "https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856";
console.log((await (await fetch(url, { headers: { "Authorization": nostrAuth("GET", url) } })).json()).data);
Ƙirƙirar Key
PATCH https://nymbot.ai/api/v1/keys/{id} Ƙaddamarwa
Sauke wani name, limit_sats, reset_period kuma
expire_at, tare da samfurin kamar yadda a lokacin samar da key. null za a sauke yanki: ba tare, ba reset, ba tsawo. Za a canza tsawon reset ba za a fara wani sabon tsawon tare da zero. A canza key ba za a iya canza (400 key_revoked(Ayyuka)
{"data": {…}} tare da key object da aka update.
cURL
URL=https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856
BODY='{"limit_sats":50000,"expire_at":null}'
curl -X PATCH "$URL" \
-H "Authorization: $(nostr_auth PATCH "$URL" "$BODY")" \
-H "Content-Type: application/json" \
-d "$BODY"
Python
import json
import requests
url = "https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856"
body = json.dumps({"limit_sats": 50000, "expire_at": None}).encode()
res = requests.patch(
url,
data=body,
headers={"Authorization": nostr_auth("PATCH", url, body), "Content-Type": "application/json"},
)
print(res.json()["data"])
JavaScript
const url = "https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856";
const body = JSON.stringify({ limit_sats: 50000, expire_at: null });
const res = await fetch(url, {
method: "PATCH",
headers: { "Authorization": nostrAuth("PATCH", url, body), "Content-Type": "application/json" },
body,
});
console.log((await res.json()).data);
Ƙirƙirar Key
DELETE https://nymbot.ai/api/v1/keys/{id} Ƙaddamarwa
Sauke key a nan, ga kyau. Yana rufe a cikin list tare da revoked_at set, kuma za a iya ganin tare da include_revoked=trueƘirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙ
Yanzu
{ "data": { "id": "4f0c9a1be27d3856", "revoked": true } }
cURL
URL=https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856
curl -X DELETE "$URL" -H "Authorization: $(nostr_auth DELETE "$URL")"
Python
import requests
url = "https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856"
print(requests.delete(url, headers={"Authorization": nostr_auth("DELETE", url)}).json())
JavaScript
const url = "https://nymbot.ai/api/v1/keys/4f0c9a1be27d3856";
const res = await fetch(url, { method: "DELETE", headers: { "Authorization": nostrAuth("DELETE", url) } });
console.log(await res.json());
NWC auto-top-up
Tuntube wani Lightning wallet tare da Nostr Wallet Connect da Nymbot yana ƙaddamar da kudi a kansa a lokacin da API gaskiya ya yi low. A app ta API sheet yana da samfurori; shi ne endpoints a kan shi. Duk da su bukatar wani Takaddun shaida.
Yadda za a yi aiki: bayan wani API baƙin da aka baƙi a kan daidaito da ka zabi ganin, idan daidaitaccen da aka ƙara karkashin kudi, Nymbot ya ba da inji don your top-up kudin, ya ba da wayoyi don bayar da shi, kuma ya sa da karkashin. Yana ƙunshi a kowace daya a kowace 5 minti ga kowane nym da kuma kudin, don haka rage na inji ba za a iya rage wayoyi. Hakanan a cikin apps ba sa shi. The lokaci da size na karshe top-up, da kuma karshe gabatarwa, suna a cikin zane-zane; idan wani bayyanar ya wuce bayan wani gabatarwa, duba inji tare da takardar kebantawa kreditoci ga.
Nymbot horo shi a kansa da kuma kawai ya yi amfani da shi don bayar da hanyoyi na top-up, amma yin haɗari kawai don wannan, tare da kudin kudin a cikin wallet, don haka mafi ya iya kammala ne wani yawan zabi. pay_invoice.
Sauke wani wallet
POST https://nymbot.ai/api/v1/nwc-auto-topup/connect Ƙaddamarwa
| Wasanni | Ƙananan | Tuntube | Tuntube mu |
|---|---|---|---|
nwc_url | Tuntube mu | Ee | Ƙungiyoyi Ƙungiyoyi Ƙungiyoyi Ƙungiyoyi Ƙungiyoyi nostr+walletconnect://. Nymbot ya ce wallet don get_info kafin sauke shi, da kuma sauke shi a kan crippled. |
threshold_sats | Tuntube | Ee | Top up a lõkacin da balans rufe a karkashin wannan yawa sats. A karkashin 1,000. |
topup_sats | Tuntube | Ee | Yadda za a ƙara kowane lokaci. 1,000 zuwa 1,000,000 sats. |
tier | Tuntube mu | ko | pro (The default) ko standard: Balance to duba da kuma top up. |
Yanzu
{
"data": {
"connected": true,
"threshold_sats": 5000,
"topup_sats": 20000,
"tier": "pro",
"last_topup_at": null,
"last_topup_sats": null,
"last_error": null
}
}
| takardar kebantawa | Kada |
|---|---|
400 | Ƙungiyoyi Ƙungiyoyi Ƙungiyoyi Ƙungiyoyi (invalid_nwc_url); wallet ba ya haƙƙoƙi game da relay (nwc_unreachable) ko ya ba da shawara (nwc_rejected); sadarwa ba za a iya bayar inji (nwc_missing_permission); ko wani yawan fiye da kudi. |
501 | Automatic top-ups ba ajiya a kan wannan server (nwc_unavailable) Sama ya dace da sauran biyu endpoints. |
cURL
URL=https://nymbot.ai/api/v1/nwc-auto-topup/connect
BODY='{"nwc_url":"nostr+walletconnect://...","threshold_sats":5000,"topup_sats":20000,"tier":"pro"}'
curl "$URL" \
-H "Authorization: $(nostr_auth POST "$URL" "$BODY")" \
-H "Content-Type: application/json" \
-d "$BODY"
Python
import json, os
import requests
url = "https://nymbot.ai/api/v1/nwc-auto-topup/connect"
body = json.dumps({
"nwc_url": os.environ["NWC_URL"],
"threshold_sats": 5000,
"topup_sats": 20000,
"tier": "pro",
}).encode()
res = requests.post(
url,
data=body,
headers={"Authorization": nostr_auth("POST", url, body), "Content-Type": "application/json"},
)
print(res.json())
JavaScript
const url = "https://nymbot.ai/api/v1/nwc-auto-topup/connect";
const body = JSON.stringify({
nwc_url: process.env.NWC_URL,
threshold_sats: 5000,
topup_sats: 20000,
tier: "pro",
});
const res = await fetch(url, {
method: "POST",
headers: { "Authorization": nostrAuth("POST", url, body), "Content-Type": "application/json" },
body,
});
console.log(await res.json());
Sauke settings
GET https://nymbot.ai/api/v1/nwc-auto-topup Ƙaddamarwa
Sauke wannan abu kamar yadda ya sauke, tare da connected: false da sauran kayayyakin
null a lokacin da ba tare da wani wallet ne mai amfani da. The connectivity string ya zama ba tare da wani lokaci.
cURL
URL=https://nymbot.ai/api/v1/nwc-auto-topup
curl "$URL" -H "Authorization: $(nostr_auth GET "$URL")"
Python
import requests
url = "https://nymbot.ai/api/v1/nwc-auto-topup"
print(requests.get(url, headers={"Authorization": nostr_auth("GET", url)}).json())
JavaScript
const url = "https://nymbot.ai/api/v1/nwc-auto-topup";
console.log(await (await fetch(url, { headers: { "Authorization": nostrAuth("GET", url) } })).json());
Ƙararrawa
DELETE https://nymbot.ai/api/v1/nwc-auto-topup/connection Ƙaddamarwa
Za a sauke da aka sauke sadarwa string. Bugu da top-ups ba a yi. Don tabbatar da cewa, za ka iya dauke da sadarwa a cikin wallet.
Yanzu
{ "data": { "connected": false, "threshold_sats": null, "topup_sats": null, "tier": null, "last_topup_at": null, "last_topup_sats": null, "last_error": null } }
cURL
URL=https://nymbot.ai/api/v1/nwc-auto-topup/connection
curl -X DELETE "$URL" -H "Authorization: $(nostr_auth DELETE "$URL")"
Python
import requests
url = "https://nymbot.ai/api/v1/nwc-auto-topup/connection"
print(requests.delete(url, headers={"Authorization": nostr_auth("DELETE", url)}).json())
JavaScript
const url = "https://nymbot.ai/api/v1/nwc-auto-topup/connection";
const res = await fetch(url, { method: "DELETE", headers: { "Authorization": nostrAuth("DELETE", url) } });
console.log(await res.json());
Sauke da ba tare da ba tare da key
The fixed-price endpoints za a iya bayar da wani baƙi a lokaci a kan Lightning, ba tare da key, ba Account da ba Balance: POST /images/generations, POST /images/edits,
POST /videos, POST /audio/speech, POST /audio/transcriptions,
POST /audio/translations kuma POST /embeddings. Chat, Reply, kuma Messages da yawa bukatar key. A ƙirƙirar da aka ƙirƙirar key an saita a kan kudade kamar yadda za a yi amfani da shi; bayarwa tsari ba ya fara kawai a lokacin da ba ya saita wani key.
Nymbot yana magana biyu version na sama ide, daga wani backend: Lightning Labs '
Kasa 402 (Yana da aka samu a karkashin wani zamani sunan, LSAT) kuma draft IETF
Kasa HTTP authentication scheme tare da lightning Method da
charge Intention. Yi amfani da abin da abokin ciniki ya sani.
Sauke ba tare da key ne kawai a lokacin da API_L402_SECRET ajiya a kowace 32 bytes, kamar hex (64 characters) ko base64 (44). openssl rand -hex 32. A ƙarin ko dacewa da farashin ya ƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙirƙira API_L402_SECRET_PREVIOUS for a day: credentials, status URLs, da kuma matsaloli da aka yi a karkashin shi, yana aiki har zuwa su rufe.
Tuntube mu
Sauke shaida tare da ba Authorization header. Idan shi ne daidaito, ba za a yi aiki, kuma za ka samu 402 Payment Required tare da takardun shaida ga cikakken abin da baƙi kudin: sama farashin a key za a bayar, da aka canza a 10 sats a Standard credit ko 100 sats a Pro credit da kuma zaune zuwa cikakken sat (kuma 1 sat, da kuma kowane 0.05 credit minimum). WWW-Authenticate matsaloli game da wannan matsaloli:
HTTP/1.1 402 Payment Required
Content-Type: application/problem+json; charset=utf-8
Cache-Control: no-store
WWW-Authenticate: L402 macaroon="AgJC...", invoice="lnbc2370n1..."
WWW-Authenticate: LSAT macaroon="AgJC...", invoice="lnbc2370n1..."
WWW-Authenticate: Payment id="kM9x...", realm="nymbot", method="lightning", intent="charge",
request="eyJhbW91bnQiOiIyMzciLC...", description="Nymbot API POST /images/generations (237 sats)",
digest="sha-256=:X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE=:", expires="2026-09-30T12:15:00.000Z",
opaque="eyJlbmRwb2ludCI6IlBPU1QgL2ltYWdlcy9nZW5lcmF0aW9ucyJ9"
{
"type": "https://paymentauth.org/problems/payment-required",
"title": "Payment Required",
"status": 402,
"detail": "This request costs 237 sats. Pay the Lightning invoice, then send the identical request again ...",
"challengeId": "kM9x...",
"amount_sats": 237,
"invoice": "lnbc2370n1...",
"payment_hash": "9db1370f...",
"expires_at": "2026-09-30T12:15:00.000Z",
"error": { "message": "This request costs 237 sats. ...", "type": "payment_required", "code": "payment_required", "param": null }
}
takardar kebantawa request parameter ne base64url JSON:
{"amount":"237","currency":"sat","methodDetails":{"invoice":"lnbc...","network":"mainnet","paymentHash":"..."}}.
Sabuntawa ne mai ban sha'awa a kan endpoint, zuwa Content-Type (ta media type da, ga multipart, da ƙarfi) da kuma zuwa SHA-256 na asali bayt ka saita, kuma yana da lokaci na 15 minti. Bayan bayar, saita takardun tambaya: sama
Content-Type da kuma sama JSON bytes, ko ga multipart endpoints (/images/edits, /audio/transcriptions, /audio/translationsManyan HTTP library zaune wani sabon ƙarfi a kowace lokacin da su encode wani form, don haka encode shi wani lokaci da kuma sauke waɗannan baiti biyu.
Kowane adireshin yana iya ba da 30 matsaloli a minti (a IPv6 adireshin yana daidaita a matsayin cikakken /64). Matsaloli da adireshin da aka ba da sha'awa yana daidaita da 10 a minti, kuma akwai wani cikakken matsaloli a kan matsaloli Nymbot matsaloli a kan duk adireshin; wani matsaloli da aka ba da kafin matsaloli (m. 429 Ƙaddamar Retry-After, ya rubuta kafin jima'i da aka saita. Ma'aikatar jima'i da aka saita ba tare da key ko credential yana da sayar da ƙarshe zuwa ƙananan jama'a na 120 unauthenticated tambayoyi a kowace minti. A credential an duba kafin jima'i da aka saita, da kuma wani tambayoyi wanda aka saita Content-Type Yana da application/json (Yaya
multipart/form-data for uploads) ne refused tare da 415 Kuma ba zai zama wani invoice.
Embeddings suna da farashin daga wani ra'ayi na tokens a cikin inji, tare da wani 1.5× marufi, kamar yadda da halayen da aka sani kawai bayan. Za ka biya domin da aka amfani da tokens, da kuma da aka amfani da sassa na biya ya zo a matsayin Takardar kebantawa.
Sauke Payment
Sauke inji tare da wani Lightning wallet. The wallet ya ba ka preimage, 64 hex characters. Sa'an nan sauke wannan samfurin tare da daya daga wadannan:
| takardun | takardun |
|---|---|
| Kasa 402 | Authorization: L402 <macaroon>:<preimage> (LSAT tambaya) |
| Kasa | Authorization: Payment <base64url JSON>, inda JSON ne {"challenge": {every parameter of the challenge, as sent}, "payload": {"preimage": "<hex>"}} |
A bayar da abokin taro kamar yadda ya yi tare da key, ba tare da cewa nymbot
Object yana ba tare da mataki: {"payment": "l402", "tier": "pro", "paid_sats": 237,
"charged_sats": 237}Kuma akwai ba X-Nymbot-Balance-Sats header. A samfurin da aka biya tare da Shigarwa shimfidar da aka samu a Payment-Receipt header (base64url JSON tare da challenge id, bayar da hash a matsayin reference, status kuma
timestamp). Ayyukan bayar da aka ba tare da wani nym, don haka su ba za su nuna a cikin yanar gizo tarihi.
| takardar kebantawa | Kada |
|---|---|
402 payment_already_used | Kowane bayyanar bayarwa don wani baƙi. Yanzu ne wani sabon baƙi don wannan baƙi, don haka wani abokan ciniki wanda ke cache ta karshe credential (kowane lnget Yin da yaushe, yaushe da yaushe. |
402 payment_mismatch | The credential da aka ba a kan wani endpoint, Content-Type kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace kowace Takardar kebantawa (refund_token kuma refund_sats a cikin jiki). |
402 payment_expired | Yau fiye da 15 minti da suka wuce bayan sha'awar. A sabon sha'awar yana da shi. Idan preimage yana nuna cewa ka bayar, abin da ka bayar da ya sa a matsayin Takardar kebantawa (refund_token kuma refund_sats a cikin jiki), a lokacin da; da aka yi amfani da kwarewa. |
401 invalid_preimage | Preimage ba ya haƙƙoƙi tare da kafin kafin kafin kafin kafin kafin kafin kafin kafin kafin kafin kafin ka. |
401 invalid_payment_credential | The credential ne malformed, aka canza bayan Nymbot ya gabatar da shi, ko sunan wani biya hash Nymbot ba ya gabatar da inji. A macaroon tare da wani caveat Nymbot ba ya sani, ko tare da m caveats, an rike. |
429 rate_limit_exceeded | Fiye da 30 credentials ko kewaye da ba za a canza ya zo daga wannan adireshin a cikin minti, ko wani refund token an saita fiye da 60 lokaci a cikin minti. Retry-After. |
cURL
BODY='{"model":"nano-banana","prompt":"a lighthouse at dusk","response_format":"b64_json"}'
URL=https://nymbot.ai/api/v1/images/generations
# 1. Get the challenge
CH=$(curl -s -D - -o /dev/null "$URL" -H "Content-Type: application/json" -d "$BODY" | grep -i '^www-authenticate: L402')
MAC=$(echo "$CH" | sed -E 's/.*macaroon="([^"]+)".*/\1/')
INVOICE=$(echo "$CH" | sed -E 's/.*invoice="([^"]+)".*/\1/')
# 2. Pay $INVOICE with your wallet and copy the preimage
PREIMAGE=...
# 3. Send the identical request with the credential
curl "$URL" -H "Content-Type: application/json" -H "Authorization: L402 $MAC:$PREIMAGE" -d "$BODY"
lnget
# lnget (Lightning Labs) pays L402 challenges from your own lnd node and retries for you
lnget -X POST -H "Content-Type: application/json" \
-d '{"model":"nano-banana","prompt":"a lighthouse at dusk","response_format":"b64_json"}' \
https://nymbot.ai/api/v1/images/generations
Python
import base64, json, re
import requests
url = "https://nymbot.ai/api/v1/images/generations"
body = json.dumps({"model": "nano-banana", "prompt": "a lighthouse at dusk", "response_format": "b64_json"}).encode()
headers = {"Content-Type": "application/json"}
challenge = requests.post(url, data=body, headers=headers)
assert challenge.status_code == 402
info = challenge.json()
print("Pay", info["amount_sats"], "sats:", info["invoice"])
preimage = pay_with_your_wallet(info["invoice"]) # 64 hex characters
# L402
mac = re.search(r'L402 macaroon="([^"]+)"', challenge.headers["WWW-Authenticate"]).group(1)
res = requests.post(url, data=body, headers={**headers, "Authorization": f"L402 {mac}:{preimage}"})
print(res.json()["nymbot"])
JavaScript
const url = "https://nymbot.ai/api/v1/images/generations";
const body = JSON.stringify({ model: "nano-banana", prompt: "a lighthouse at dusk", response_format: "b64_json" });
const headers = { "Content-Type": "application/json" };
const challenge = await fetch(url, { method: "POST", headers, body });
const www = challenge.headers.get("www-authenticate");
// The Payment scheme: echo every challenge parameter back with the preimage
const start = www.indexOf("Payment ");
const params = Object.fromEntries([...www.slice(start + 8).matchAll(/(\w+)="((?:[^"\\]|\\.)*)"/g)].map((m) => [m[1], m[2]]));
const { invoice } = JSON.parse(Buffer.from(params.request, "base64url").toString()).methodDetails;
const preimage = await payWithYourWallet(invoice);
const credential = Buffer.from(JSON.stringify({ challenge: params, payload: { preimage } })).toString("base64url");
const res = await fetch(url, { method: "POST", headers: { ...headers, Authorization: `Payment ${credential}` }, body });
console.log((await res.json()).nymbot, res.headers.get("payment-receipt"));
Customers kafa a kan mppx tare da wani Lightning method, za a yi amfani da Payment challenge da su; ya nuna su a kan endpoint da kuma ba su bayar.
Wasanni
a bayar da POST /videos Yanzu 202 kamar wani keyed daya, plus a
status_url: GET shi ba tare da wani key don tafiya tare da aiki. Yana signed da yana aiki don 24 hours, kamar yadda aiki da aka samu.
{
"id": "vid_...",
"status": "in_progress",
"status_url": "https://nymbot.ai/api/v1/videos/vid_...?exp=1790000000&sig=...",
"nymbot": {
"payment": "l402", "tier": "pro", "paid_sats": 4800, "charged_sats": 4800,
"refund_token": "REFUND-5E0B..."
}
}
Sauke refund_token daga wannan tsari: shi ne kawai nuna a nan. Yana ba tare da video (GET /api/v1/l402/refunds Yanzu "status": "pending"); idan yi ba tare da baƙi baƙi baƙi, biya ya zama a kan shi. Status URL ya nuna
refund_sats a kan aiki da aka ba da kudi, amma ba tare da token, don haka samar da status URL ba zai ba da kudi.
Tuntube mu
Idan ba da ba da ba da ba da ba da ba da ba da ba da ba da ba da ba da ba da ba da ba. Idan ba da ba da ba da ba da ba da ba da ba, ba da ba da ba da ba da ba. charged_sats, kamar yadda a kan keyed request. Idan shi ba tare da ba tare da karfafawa, gabatarwa yana da wani Takardar kebantawa Yadda za a biya:
{
"error": {
"message": "The image generator failed. Nothing was charged. Please try again. The 237 sats you paid are on refund token REFUND-...",
"type": "api_error",
"code": "upstream_error",
"refund_token": "REFUND-0C15DBED145D59131BA70298A413ADEB3D9B9AB082C476EA70A5BD38FCA5DE6D",
"refund_sats": 237,
"refund_expires_at": "2026-10-30T12:00:00.000Z"
}
}
Ƙungiyoyin da aka yi amfani da wannan abu: idan ka ba da biyu hotuna da kuma daya ba da kyakkyawan, yanar gizo nymbot object yana ƙirƙirar wani refund token ga m daya; wani transcription wanda tsawon ba za a iya karantawa a karkashin ya dace da mafi tsawon da fayil za a iya zama (kuma fiye da 30 minti), kuma daban-daban zuwa daidai tsawon ya dace a matsayin refund token; idan ya yi fiye da 30 minti, shi ne ba tare da 413
da dukan bayyanar da aka saukar. Embeddings saukar da abin da aka saukar da takardun shaida. A failed video saukar da token da aka saukar.
A daidaitaccen token ne wani 256-bit code. Nymbot hanya kayyade da hash, kuma ya rufe bayan 30 kwanaki. Yana rufe wani sat balance, kuma za ka iya:
- bayar da shi. Sauke
Authorization: Bearer REFUND-…a kan wani daga cikin ƙarshe na karkashin (OpenAI SDK ya samu shi a matsayin API key).refund_token_satsa cikinnymbotObject). A token mai karfi fiye da matsaloli402refund_insufficient; wani baƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙoƙi. - Sauke shi.
GET /api/v1/l402/refundstare da wannan header ya saita{"sats": 237, "status": "open", "expires_at": "..."}. - Duk wani token za a iya amfani da fiye da 60 lokaci a kowace minti.
- Sanya shi zuwa nym. Sauke shi a Sauke wani Gift a cikin Nymbot app, ko call
POST /api/v1/l402/refunds/redeema Takaddun shaida kuma{"refund_token": "REFUND-...", "balance": "standard"}(Yaya"pro"). Dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole-dole.
cURL
URL=https://nymbot.ai/api/v1/l402/refunds/redeem
BODY='{"refund_token":"REFUND-...","balance":"standard"}'
curl "$URL" \
-H "Authorization: $(nostr_auth POST "$URL" "$BODY")" \
-H "Content-Type: application/json" \
-d "$BODY"
Yanzu
{ "data": { "credited": 23, "tier": "standard", "balance_credits": 123, "remaining_sats": 7 } }