yes. So the credits are linked to the key that signed the event.

Any reputable key on nostr gets 100 credits / day. If the user is signed out you would have to hardcode a key.

But actually I would just ask the user to sign in.

Reply to this note

Please Login to reply.

Discussion

Yeah, but in practice most don’t want to. And don’t want to build a NIP-46 sign-in for this that won’t get a lot of use anyway. The feature really needs to work without requiring sign-in.

feedback taken.

How would you do it if you were in me?

I’m not sure, but how many queries could I get with the API if it didn’t depend on a Nostr profile to serve as the key? And could the feature be zap-based to activate?

At the moment no queries unless you sign with a nostr key with credits.

At the beginning it was totally open and in 2 weeks since the launch I got people abusing it, so I had to gate it somehow.

Yes it could be zap based but I would still have to check if your key has zapped vertex, so still sign in.

I could accept ecash in the request, but then your user would have to have a wallet, which imo is more selective than a sign in

What about an NWC subscription?

but what's the difference between signing in and connecting your wallet with NWC?

I argue that the first is even easier, and it's free.

To clarify, I mean an NWC subscription to use the API from the app itself, not a per-user fee, and it doesn’t require sign-in. I could choose to add a session fee on the app side, or keep it free to the user, depending on the cost.

Yes, this is a good idea.

You would have to use an API key in the client, which is the same as loading credits on a nostr key and using it in the client. It's basically the same

Right, the difference being that with NWC I can set a budget so there’s no need to manually top-up the balance.

yes this is true.

The UX for builders is not where I want it to be, but there is so much to build and I have to prioritise

ᴡʀᴏɴɢ. ɴᴏꜱᴛʀ ɴɪᴘ-07 ʟᴏɢɪɴ ɪꜱ ᴛʀɪᴠɪᴀʟ ᴛᴏ ɪᴍᴘʟᴇᴍᴇɴᴛ. ᴡɪᴛʜᴏᴜᴛ ᴀᴜᴛʜ ᴛʜᴇʀᴇ ɪꜱ ɴᴏ ᴡᴀʏ ᴛᴏ ʙʟᴀᴄᴋʟɪꜱᴛ ᴀʙᴜꜱɪᴠᴇ ᴜꜱᴇʀꜱ ᴏʀ ᴛʀᴀᴄᴋ ᴇxᴄᴇꜱꜱɪᴠᴇ ᴜꜱᴇ ᴡɪᴛʜᴏᴜᴛ ᴘᴀʏɪɴɢ