Quickstart
-
Add funds. Open the Developers page in the Aderra app (any account, Free included). Click Add funds, enter any amount from $5 and click Pay by card or Pay with crypto. The credits arrive once the payment is confirmed. See Pricing and the API wallet.
-
Create a key. Click Create key, give it a name and click Create key again. Copy the key: it starts with
ak_and is shown once. -
Keep the key out of your code. Put it in an environment variable:
Terminal window export ADERRA_API_KEY=ak_... -
Make a call.
Terminal window curl https://api.aderra.ai/v1/chat/completions \-H "Authorization: Bearer $ADERRA_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "deepseek-v4.1-flash-uncensored","max_tokens": 1024,"messages": [{"role": "user", "content": "Write a haiku about the sea."}]}'Terminal window pip install openaiimport osfrom openai import OpenAIclient = OpenAI(base_url="https://api.aderra.ai/v1",api_key=os.environ["ADERRA_API_KEY"],)reply = client.chat.completions.create(model="deepseek-v4.1-flash-uncensored",max_tokens=1024,messages=[{"role": "user", "content": "Write a haiku about the sea."}],)print(reply.choices[0].message.content)Terminal window npm install openaiimport OpenAI from 'openai';const client = new OpenAI({baseURL: 'https://api.aderra.ai/v1',apiKey: process.env.ADERRA_API_KEY,});const reply = await client.chat.completions.create({model: 'deepseek-v4.1-flash-uncensored',max_tokens: 1024,messages: [{ role: 'user', content: 'Write a haiku about the sea.' }],});console.log(reply.choices[0].message.content); -
See it on the Developers page. The call appears under Requests, with its tokens, cost and duration.
You can create a key before adding funds, but every call is refused with 402 api_wallet_empty until the wallet holds credits.
Stream the answer
Section titled “Stream the answer”Add stream: true to get the reply as it is written.
curl -N https://api.aderra.ai/v1/chat/completions \ -H "Authorization: Bearer $ADERRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4.1-flash-uncensored", "max_tokens": 1024, "stream": true, "messages": [{"role": "user", "content": "Write a haiku about the sea."}] }'stream = client.chat.completions.create( model="deepseek-v4.1-flash-uncensored", max_tokens=1024, stream=True, messages=[{"role": "user", "content": "Write a haiku about the sea."}],)for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="", flush=True)print()const stream = await client.chat.completions.create({ model: 'deepseek-v4.1-flash-uncensored', max_tokens: 1024, stream: true, messages: [{ role: 'user', content: 'Write a haiku about the sea.' }],});for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content ?? '');}process.stdout.write('\n');Next steps
Section titled “Next steps”- Prefer the Anthropic SDK? See Anthropic Messages.
- Pick a model: Models.
- Make images, video and speech: Images, Video, Text to speech.
- Before you go to production: Rate limits and Errors.