Quick start

A first reply in three steps.

Base URL
https://api.aerless.si/v1
Key
Authorization: Bearer AERLESS_...
Model
deepseek-v4.1-flash-abliterated
  1. Create a key

    Create an account, then a key under API Keys.

  2. Put it in AERLESS_API_KEY

    setup
    curl
    export AERLESS_API_KEY="AERLESS_..."
    Python
    pip install openai
    export AERLESS_API_KEY="AERLESS_..."
    Node
    npm install openai
    export AERLESS_API_KEY="AERLESS_..."
  3. Send a request

    request
    curl
    curl https://api.aerless.si/v1/chat/completions \
      -H "Authorization: Bearer $AERLESS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "deepseek-v4.1-flash-abliterated",
        "messages": [{"role": "user", "content": "Write a two-line poem about the sea."}]
      }'
    Python
    import os
    from openai import OpenAI
    
    client = OpenAI(
        base_url="https://api.aerless.si/v1",
        api_key=os.environ["AERLESS_API_KEY"],
    )
    
    response = client.chat.completions.create(
        model="deepseek-v4.1-flash-abliterated",
        messages=[{"role": "user", "content": "Write a two-line poem about the sea."}],
    )
    print(response.choices[0].message.content)
    Node
    import OpenAI from "openai";
    
    const client = new OpenAI({
      baseURL: "https://api.aerless.si/v1",
      apiKey: process.env.AERLESS_API_KEY,
    });
    
    const response = await client.chat.completions.create({
      model: "deepseek-v4.1-flash-abliterated",
      messages: [{ role: "user", content: "Write a two-line poem about the sea." }],
    });
    console.log(response.choices[0].message.content);
    example reply
    Grey tides fold the evening light,
    and carry every shore toward night.
    choices[0].message.content
    The reply
    usage
    Input and output tokens
    choices[0].finish_reason
    stop, when the reply is complete
    Full response
    Response
    {
      "id": "‹id›",
      "object": "chat.completion",
      "created": ‹unix time›,
      "model": "deepseek-v4.1-flash-abliterated",
      "choices": [
        {
          "index": 0,
          "message": {
            "role": "assistant",
            "content": "‹the reply›"
          },
          "finish_reason": "stop"
        }
      ],
      "usage": {
        "prompt_tokens": ‹input tokens›,
        "completion_tokens": ‹output tokens›
      }
    }

Switching from OpenAI#

Change two settings and use your Aerless AI key.

SettingPythonJavaScript
Base URLbase_url="https://api.aerless.si/v1"baseURL: "https://api.aerless.si/v1"
Modelmodel="deepseek-v4.1-flash-abliterated"model: "deepseek-v4.1-flash-abliterated"

Next#