Agent quickstart
Choose a real model and make a first request with a regular API key.
Also available as Markdown · all agent guides in one file
Key points
- Use a regular Aether API key for applications, automation and your own agents.
- SDK base URL:
https://api.aetherapi.dev/v1. Authenticate withAuthorization: Bearer <your API key>. - Choose an exact model ID from the catalogue at
/v1/modelswhosesupported_endpointsincludes the endpoint you call. Live generation can consume credits.
For applications, automation and your own agents, use a regular Aether API key. Create it in an authorized project in https://dashboard.aetherapi.dev.
Connection details
| Setting | Value |
|---|---|
| API origin | https://api.aetherapi.dev |
| OpenAI-compatible SDK base URL | https://api.aetherapi.dev/v1. Append /chat/completions to that SDK base, not /v1/chat/completions again. |
| HTTP authentication | Authorization: Bearer <your API key>. Keep keys in environment variables or a secret store; never embed them in frontend bundles or logs. |
- Discover exact model IDs,
supported_endpointsand per-endpoint capabilities withGET https://api.aetherapi.dev/v1/models. - Do not infer an ID from a marketing name or use the first model without checking its endpoint.
- Machine-readable contract:
GET https://api.aetherapi.dev/openapi.json(OpenAPI 3.0.3, no authentication). Its schemas describe possible request and response shapes, not the capabilities of a particular model.
Live requests
Live generation can consume credits. Use the separately enabled/v1/sandbox routes for simulated integration checks. Never silently fall back from sandbox to live requests.Select a model
The public model catalogue can be read without credentials. This command retrieves the catalogue. Select a chat model, then set AETHER_MODEL to that exact ID. The model-discovery document includes a filtered listing.
Node.js 20 or later is required for the JavaScript examples; no SDK dependency is needed.
curl --fail-with-body https://api.aetherapi.dev/v1/models
# Set AETHER_API_KEY privately in your environment.
# Set AETHER_MODEL to an exact catalogue ID supporting /v1/chat/completions.Make a request
Save as quickstart.mjs and run node quickstart.mjs. This checks the current public catalogue before making one live request. It does not prove access for your key or advanced model features.
const origin = "https://api.aetherapi.dev";
const apiKey = process.env.AETHER_API_KEY;
const model = process.env.AETHER_MODEL;
if (!apiKey || !model) throw new Error("Set AETHER_API_KEY and AETHER_MODEL");
const catalogueResponse = await fetch(origin + "/v1/models");
if (!catalogueResponse.ok) throw new Error("Model discovery failed: " + catalogueResponse.status);
const catalogue = await catalogueResponse.json();
const entry = catalogue.data.find(item => item.id === model);
if (!entry?.supported_endpoints?.includes("/v1/chat/completions")) {
throw new Error("Choose an exact model ID supporting /v1/chat/completions");
}
const response = await fetch(origin + "/v1/chat/completions", {
method: "POST",
headers: { Authorization: "Bearer " + apiKey, "Content-Type": "application/json" },
body: JSON.stringify({ model, messages: [{ role: "user", content: "Say hello in one sentence." }] }),
});
const result = await response.json();
if (!response.ok || result.error) {
throw new Error(JSON.stringify({ status: response.status, error: result.error,
request_id: response.headers.get("x-request-id") }));
}
console.log(result.choices[0].message.content);The next documents cover authentication, model capabilities, streaming, client-side tool execution, structured output, retries with optional idempotency and the sandbox. Read those limits before adding autonomous actions.