How to use Obscurify with curl

First, get an API key. The easiest way: sign up at obscurify.ai/signup, then press Show API Key on your account page.

From a terminal instead, one command makes the account and prints its account code and API key. The code is made on your machine and never sent:

npx -y @obscurify/cli signup

Save the account code it prints: it’s the only way to sign in. To call the sign-up endpoints yourself, see Get an API key from your account code.

Add credit on your account page with crypto or card. If you choose a blind voucher, your browser blinds it, so we can’t link the payment to your account. To redeem a voucher code over the API:

curl -X POST https://obscurify.ai/vouchers/redeem \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer sk-obs1_AbCd...' \
-d '{"vouchers": ["obv1.2000...."]}'

Signed up with a username and password? Password sign-in and old sk- tokens without obs1 are being retired. Sign in once at obscurify.ai/account to get your account code, then use the key above.

Then use curl to interact with the API:

curl -X POST https://obscurify.ai/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer sk-obs1_AbCd...' \
-d '{"messages": [{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, AI!"}],
"model": "openai/gpt-3.5-turbo"
}'

Response:

{... "choices": [{..., "message":
{"content": "Hello! How can I assist you today?", "role": "assistant",
...}}],...}