Develop

API reference

The Ren API lets you drive Astra programmatically over a single, stable HTTPS endpoint. Authenticate with your Ren API key and send a request — there's no SDK to install and nothing else to configure.

Authentication

Every request carries your Ren API key as a bearer token. Create and manage keys in your API console. Keep keys on the server — never ship one to a browser or commit it to a repository.

Authorization headerhttp
Authorization: Bearer $REN_API_KEY

Sending a message

Post a list of messages to the Astra endpoint and set the model id to astra. Set stream to receive the reply as server-sent events as it is generated.

Requestbash
curl https://api.ren.ai/v1/messages \
  -H "Authorization: Bearer $REN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "astra",
    "stream": true,
    "messages": [
      { "role": "user", "content": "Explain how billing pagination works in this repo." }
    ]
  }'

From your code

Any language that can make an HTTPS request can call Astra — no client library required. Here it is with the built-in fetch, reading the stream as it arrives.

TypeScriptts
const res = await fetch("https://api.ren.ai/v1/messages", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.REN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "astra",
    stream: true,
    messages: [
      { role: "user", content: "Refactor the cursor pagination to coalesce nulls." },
    ],
  }),
});

// Astra streams the reply as server-sent events — read them as they arrive.
const reader = res.body!.getReader();
const decoder = new TextDecoder();
for (;;) {
  const { done, value } = await reader.read();
  if (done) break;
  process.stdout.write(decoder.decode(value));
}

Planned capabilities

  • Repository understanding over a connected codebase.
  • Code generation and architecture analysis.
  • Pull request creation as an API operation.
  • Agent workflows that plan, run, and verify multi-step changes.