Examples

Aether API works with AetherCLI, Pi, OpenCode, Roo Code, Cline, Kilo Code, n8n, OpenClaw, and Hermes Agent. Drop-in OpenAI-compatible access — change the base URL and keep your code.

Drop-in compatible with anything that speaks OpenAI. Change the base URL, keep your existing code.

Supported integrations

IntegrationCategoryWhat it does
AetherCLITerminalOur own command-line client for prompts, saved chats, cost previews and a terminal UI.
PiTerminalMinimal coding agent for the terminal. Install Pi, then add AetherAPI as a provider with one command. It asks for your key.
OpenCodeTerminalOpen-source coding agent for the terminal. Add Aether as a custom provider, then pick it with /models.
Roo CodeVS CodeAI coding agent for VS Code. The project is archived, so it gets no more updates, but installed versions keep working.
ClineVS CodeAutonomous coding assistant. Creates files, runs commands, and uses the browser.
Kilo CodeVS CodeCoding agent with multi-file editing and terminal access. Add Aether as a custom provider.
n8nAutomationVisual workflow automation. Create an OpenAI credential and set its Base URL to Aether.
OpenClawAssistantOpen-source AI assistant that you run yourself. Add Aether as a provider in its config file.
Hermes AgentAgentSelf-improving AI agent by Nous Research for the terminal and messaging apps. Point it at a custom endpoint.

Anything with OpenAI-compatible support works out of the box. Set your base URL to https://api.aetherapi.dev/v1 and keep your existing SDK calls.

Build your own

Any client that speaks the OpenAI protocol works: change the base URL and pass your Aether API key as a Bearer token. Endpoint reference lives in the API documentation.

Code examples

Chat completion

The one request every OpenAI client already knows. Point the SDK at Aether, pick any chat model from the catalogue and read the answer. POST /v1/chat/completions. See Chat completions.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

response = client.chat.completions.create(
    model="gpt-6-luna",
    messages=[{"role": "user", "content": "Explain DNS in one sentence."}],
)

print(response.choices[0].message.content)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const response = await client.chat.completions.create({
  model: "gpt-6-luna",
  messages: [{ role: "user", content: "Explain DNS in one sentence." }],
});

console.log(response.choices[0].message.content);

cURL

curl https://api.aetherapi.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "messages": [{"role": "user", "content": "Explain DNS in one sentence."}]
  }'

Streaming

Print tokens as they arrive. The stream is Server-Sent Events and ends with data: [DONE]. POST /v1/chat/completions. See Streaming.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

stream = client.chat.completions.create(
    model="gpt-6-luna",
    messages=[{"role": "user", "content": "Write a haiku about latency."}],
    stream=True,
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const stream = await client.chat.completions.create({
  model: "gpt-6-luna",
  messages: [{ role: "user", content: "Write a haiku about latency." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

cURL

curl -N https://api.aetherapi.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "stream": true,
    "messages": [{"role": "user", "content": "Write a haiku about latency."}]
  }'

Responses API

Use the newer OpenAI interface with a single input field and a convenient output_text in the SDKs. POST /v1/responses. See Responses.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

response = client.responses.create(
    model="gpt-6-luna",
    input="What is the capital of France?",
)

print(response.output_text)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const response = await client.responses.create({
  model: "gpt-6-luna",
  input: "What is the capital of France?",
});

console.log(response.output_text);

cURL

curl https://api.aetherapi.dev/v1/responses \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-luna",
    "input": "What is the capital of France?"
  }'

Tool calling

Let a model ask for a function, run it in your own code and send the result back. Aether forwards the tool definitions; validate the arguments before you execute anything. POST /v1/chat/completions. See Agent integration.

Python

import json
from datetime import datetime, timezone
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

tools = [{
    "type": "function",
    "function": {
        "name": "get_utc_time",
        "description": "Read the current UTC time.",
        "parameters": {"type": "object", "properties": {}},
    },
}]
messages = [{"role": "user", "content": "What is the UTC time?"}]

first = client.chat.completions.create(
    model="gpt-6-luna", messages=messages, tools=tools,
)
reply = first.choices[0].message
messages.append(reply)

for call in reply.tool_calls or []:
    result = {"utc": datetime.now(timezone.utc).isoformat()}
    messages.append({
        "role": "tool",
        "tool_call_id": call.id,
        "content": json.dumps(result),
    })

final = client.chat.completions.create(
    model="gpt-6-luna", messages=messages, tools=tools,
)
print(final.choices[0].message.content)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const tools = [{
  type: "function",
  function: {
    name: "get_utc_time",
    description: "Read the current UTC time.",
    parameters: { type: "object", properties: {} },
  },
}];
const messages = [{ role: "user", content: "What is the UTC time?" }];

const first = await client.chat.completions.create({
  model: "gpt-6-luna", messages, tools,
});
const reply = first.choices[0].message;
messages.push(reply);

for (const call of reply.tool_calls ?? []) {
  messages.push({
    role: "tool",
    tool_call_id: call.id,
    content: JSON.stringify({ utc: new Date().toISOString() }),
  });
}

const final = await client.chat.completions.create({
  model: "gpt-6-luna", messages, tools,
});
console.log(final.choices[0].message.content);

Anthropic Messages

Keep the Anthropic SDK. Its base URL has no /v1, because the SDK adds the path itself. POST /v1/messages. See Authentication.

Python

from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.aetherapi.dev",
    api_key="sk-aetherapi-...",
)

message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=512,
    messages=[{"role": "user", "content": "Name three uses of a hash map."}],
)

print(message.content[0].text)

JavaScript

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.aetherapi.dev",
  apiKey: "sk-aetherapi-...",
});

const message = await client.messages.create({
  model: "claude-sonnet-5-5",
  max_tokens: 512,
  messages: [{ role: "user", content: "Name three uses of a hash map." }],
});

console.log(message.content[0].text);

cURL

curl https://api.aetherapi.dev/v1/messages \
  -H "x-api-key: sk-aetherapi-..." \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "Name three uses of a hash map."}]
  }'

Image generation

Turn a prompt into an image. Depending on the model, the response carries a URL or base64 data. POST /v1/images/generations. See Image generation.

Python

import base64

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

image = client.images.generate(
    model="gpt-image-2",
    prompt="A lighthouse on a cliff at dusk, watercolour",
    size="1024x1024",
)

result = image.data[0]
if result.url:
    print(result.url)
else:
    with open("lighthouse.png", "wb") as file:
        file.write(base64.b64decode(result.b64_json))
    print("Saved lighthouse.png")

JavaScript

import { writeFile } from "node:fs/promises";
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const image = await client.images.generate({
  model: "gpt-image-2",
  prompt: "A lighthouse on a cliff at dusk, watercolour",
  size: "1024x1024",
});

const [result] = image.data;
if (result.url) {
  console.log(result.url);
} else {
  await writeFile("lighthouse.png", Buffer.from(result.b64_json, "base64"));
  console.log("Saved lighthouse.png");
}

cURL

curl https://api.aetherapi.dev/v1/images/generations \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A lighthouse on a cliff at dusk, watercolour",
    "size": "1024x1024"
  }'

Text to speech

Send text and get raw audio bytes back. Save them straight to a file. POST /v1/audio/speech. See Audio.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

with client.audio.speech.with_streaming_response.create(
    model="tts-1",
    voice="alloy",
    input="Hello, welcome to Aether API!",
) as response:
    response.stream_to_file("speech.mp3")

JavaScript

import { writeFile } from "node:fs/promises";
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const speech = await client.audio.speech.create({
  model: "tts-1",
  voice: "alloy",
  input: "Hello, welcome to Aether API!",
});

await writeFile("speech.mp3", Buffer.from(await speech.arrayBuffer()));

cURL

curl https://api.aetherapi.dev/v1/audio/speech \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "voice": "alloy",
    "input": "Hello, welcome to Aether API!"
  }' \
  --output speech.mp3

Transcription

Upload an audio file as multipart form data and get the text back. POST /v1/audio/transcriptions. See Audio.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

with open("audio.mp3", "rb") as audio:
    transcript = client.audio.transcriptions.create(
        model="whisper-1",
        file=audio,
    )

print(transcript.text)

JavaScript

import { createReadStream } from "node:fs";
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const transcript = await client.audio.transcriptions.create({
  model: "whisper-1",
  file: createReadStream("audio.mp3"),
});

console.log(transcript.text);

cURL

curl https://api.aetherapi.dev/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -F "[email protected]" \
  -F "model=whisper-1"

Embeddings

Turn text into a vector for search, clustering or retrieval. POST /v1/embeddings. See Embeddings.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.aetherapi.dev/v1",
    api_key="sk-aetherapi-...",
)

result = client.embeddings.create(
    model="text-embedding-3-small",
    input="Hello world",
)

print(len(result.data[0].embedding))

JavaScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aetherapi.dev/v1",
  apiKey: "sk-aetherapi-...",
});

const result = await client.embeddings.create({
  model: "text-embedding-3-small",
  input: "Hello world",
});

console.log(result.data[0].embedding.length);

cURL

curl https://api.aetherapi.dev/v1/embeddings \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": "Hello world"
  }'

List models

Read the public catalogue with prices and supported endpoints. No key needed. GET /v1/models. See Quickstart.

Python

import requests

catalogue = requests.get("https://api.aetherapi.dev/v1/models").json()

for model in catalogue["data"]:
    print(model["id"], model["input_cost"], model["output_cost"])

JavaScript

const response = await fetch("https://api.aetherapi.dev/v1/models");
const catalogue = await response.json();

for (const model of catalogue.data) {
  console.log(model.id, model.input_cost, model.output_cost);
}

cURL

curl https://api.aetherapi.dev/v1/models \
  | jq -r '.data[] | "\(.id) \(.input_cost) \(.output_cost)"'

Check your balance

Read the credit balance and lifetime usage for whatever your key is scoped to. GET /v1/usage. See Usage & credits.

Python

import requests

response = requests.get(
    "https://api.aetherapi.dev/v1/usage",
    headers={"Authorization": "Bearer sk-aetherapi-..."},
)

print(response.json())

JavaScript

const response = await fetch("https://api.aetherapi.dev/v1/usage", {
  headers: { Authorization: "Bearer sk-aetherapi-..." },
});

console.log(await response.json());

cURL

curl https://api.aetherapi.dev/v1/usage \
  -H "Authorization: Bearer sk-aetherapi-..."

Aether API — OpenAI-compatible access to 15 providers through one API key.