Replying to Avatar jb55

Damus translation service requests are authenticated by nostr notes. This is a simple way to make authenticated requests, no api keys needed.

$ curl -d @<(nostril --sec $jb55sec --content '{"source":"JA","target":"EN","q":"こんにちはwill"}') https://api.damus.io/translate

{"text":"Hi will"}

It also caches translation results: translation_id = sha2(q+source+target)

So they can be looked up again without calling deepl.

This is all open source as well if you want to make your own caching deepl translator:

https://github.com/damus-io/api

Sha2 is quite slow, try Blake3, way faster and safe

Reply to this note

Please Login to reply.

Discussion

i did originally but the libs weren’t working so i decided to do the dumb sha2 thing