rebornpad

HTTP API · v1

API reference

rebornpad stores the working context of a coding agent — indexed source, embeddings, and conversation state — and gives it back on demand as a single packed bundle.

Open beta. The v1 surface is stable enough to build against, but response shapes may still gain fields. Breaking changes are announced in the changelog at least 14 days ahead.

The API reference is maintained in English only. Guides and the rest of the site are also available in Latvian, German, French and Spanish.

Overview

All endpoints live under a single origin. There is one region during the beta.

https://rebornpad.dev/api/v1

Requests and responses are JSON unless stated otherwise. Two endpoints are exceptions and are documented as such: /ingest takes a binary chunk stream, and /query/ returns an encoded bundle as plain text.

Every response carries an X-Request-Id header. Quote it when reporting a problem — it is the only way to find your request in our logs, since we do not store request bodies.

Authentication

Pass your beta token as a bearer token on every request.

Authorization: Bearer rp_7hQ2xLm9vKdT4pRnW8sYbAc3

Tokens are issued instantly from the home page and are shown once. There is no account, no email, and no password — the token is the identity. If you lose it, issue a new one; the old collections become unreachable and are pruned after 14 days.

New tokens enter an activation queue and normally become usable within 24 hours. Until then every authenticated endpoint answers 401 unauthorized. This is expected and does not mean the token is malformed.

Tokens carry no tier marker on purpose: the ones you issue during the beta keep working after general availability, so nothing you build now has to be re-keyed later.

Token format

PartMeaning
rp_Issuer prefix.
24 charsRandom identifier, base62.

Connection handling

Agent workloads look very different from ordinary web traffic, and the API is shaped around that. Read this section before you tune timeouts or put a proxy in front of the client.

Long-lived connections are the normal case

An agent typically opens one connection at the start of a session and keeps it for as long as it is working — minutes for a quick edit, several hours for a long refactor. Both /ingest and /stream are designed to be held open. Idle timeouts below 300 seconds will cut healthy sessions.

Traffic is symmetric

Unlike a download API, rebornpad moves comparable volume in both directions. A repository sync pushes embeddings up while the agent pulls context back down over the same session. Plan for upstream throughput close to your downstream figure — this surprises people who size their egress on read-heavy assumptions.

HTTP/3 is preferred where available

The origin advertises HTTP/3 over QUIC on UDP 443 and falls back to HTTP/2 over TCP 443. Streaming endpoints benefit noticeably from HTTP/3: head-of-line blocking on a single TCP connection is the main source of stalls during large ingests, and QUIC's connection migration keeps sessions alive across network changes, which matters when an agent runs on a laptop that moves between networks.

If your environment blocks UDP, everything still works over HTTP/2 — expect longer tail latency on ingest.

Concurrency

Six concurrent connections per token is a reasonable ceiling; the SDKs default to four. Above that you are competing with yourself for the same per-token rate budget.

Collections

A collection is one indexed body of work — usually a repository, sometimes a directory or a document set. Collections hold chunks, their embeddings, and the conversation state attached to them.

List collections

GET /api/v1/collections

Returns every collection reachable with the current token, newest first.

curl https://rebornpad.dev/api/v1/collections \
  -H "Authorization: Bearer $RP_TOKEN"
{
  "collections": [
    {
      "id": "col_9fK2mQ",
      "name": "monorepo/api",
      "chunks": 18422,
      "dims": 1024,
      "bytes": 412839104,
      "updated_at": "2026-07-16T20:41:07Z"
    }
  ],
  "next": null
}

Results are paginated at 50. When next is not null, pass it back as the cursor query parameter.

Create a collection

POST /api/v1/collections

FieldTypeNotes
namestringRequired. Free-form label, 1–128 characters.
dimsintegerEmbedding width. 256–4096. Fixed after creation.
metricstringcosine (default), dot, or l2.
curl -X POST https://rebornpad.dev/api/v1/collections \
  -H "Authorization: Bearer $RP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"monorepo/api","dims":1024,"metric":"cosine"}'

Responds 201 with the collection object. Creating a collection with a name that already exists returns the existing one rather than a duplicate, so the call is safe to repeat.

Delete a collection

DELETE /api/v1/collections/{id}

Removes the collection and everything in it. Responds 204. Deletion is immediate and cannot be undone.

Ingest

Stream chunks into a collection

POST /api/v1/ingest

The write path. Send a chunked request body and keep it open for the whole sync — reopening a connection per batch is the most common cause of slow ingests.

HeaderValue
Content-Typeapplication/x-ndjson
Transfer-Encodingchunked
X-CollectionTarget collection id.
X-Idempotency-KeyOptional. Repeats within 24 hours are ignored.

Each line is one record: the chunk text, its embedding, and whatever metadata you want back at query time.

{"path":"src/auth/session.ts","span":[1,64],"text":"export async function...","vector":[0.0131,-0.0447, ...],"meta":{"lang":"ts","rev":"a91f2c0"}}
{"path":"src/auth/session.ts","span":[64,128],"text":"const rotate = ...","vector":[0.0219,0.0082, ...],"meta":{"lang":"ts","rev":"a91f2c0"}}

The server acknowledges progress on the same connection while you are still writing, so you can apply backpressure instead of buffering:

{"ack":512,"accepted":512,"rejected":0}
{"ack":1024,"accepted":1023,"rejected":1,"errors":[{"line":997,"code":"dims_mismatch"}]}

A full index of a mid-sized repository is normally a few hundred megabytes and takes several minutes. Large monorepos run into the low gigabytes and can take an hour or more; this is the expected shape of the workload, not a fault.

Query

Fetch a packed context bundle

GET /api/v1/query/{bundle}

The read path, and the one your agent will call most. Given a bundle handle, it returns everything the agent needs to resume work: the retrieved chunks, their metadata, and the conversation state saved alongside them.

The response is not JSON. It is a single base64 line: the bundle is serialised, deflated and encoded so that it can be dropped into an agent's context loader without a parser, piped through tools that expect text, or cached as-is.

curl https://rebornpad.dev/api/v1/query/b_4Kd82nQmZs \
  -H "Authorization: Bearer $RP_TOKEN"
HTTP/2 200
content-type: text/plain; charset=utf-8
x-request-id: 8f2a1c0b4e7d
x-bundle-chunks: 64
x-bundle-encoding: deflate+base64

eJyNVMtu2zAQ/BWCpxaQZTt2HNvIoUkPPRQtiiA9FEVB
S2ubDUUKJGVHKPrvXVKSLTtO0IsF7s7Ozs4u/YcKrjSN
6UZrY0ejrNlsBmnKM5nmTFdpxvNRxrJRlmXpZDIej8bp
...

Decode it with whatever your language gives you:

import base64, zlib, json

raw = resp.text.encode()
bundle = json.loads(zlib.decompress(base64.b64decode(raw)))

for chunk in bundle["chunks"]:
    print(chunk["path"], chunk["score"])

Bundle handles are created by a search call and stay valid for 24 hours. They are opaque — do not construct them by hand.

Typical bundles are 40–400 KB. A bundle assembled from a whole-repository sweep can exceed 10 MB, which is why the endpoint sends compressed bytes rather than JSON.

Search a collection

POST /api/v1/search

Runs nearest-neighbour search and returns a bundle handle for /query/ to fetch.

curl -X POST https://rebornpad.dev/api/v1/search \
  -H "Authorization: Bearer $RP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"collection":"col_9fK2mQ","vector":[0.021,-0.004, ...],"k":24,"include_state":true}'
{
  "bundle": "b_4Kd82nQmZs",
  "chunks": 24,
  "expires_at": "2026-07-19T09:12:44Z"
}

Stream

Open a session channel

GET /api/v1/stream

A persistent bidirectional channel for an agent session. Context updates flow down as the collection changes; state checkpoints flow up as the agent works. Most integrations open this once at session start and close it when the agent stops.

ParameterNotes
collectionRequired. Collection to follow.
sinceOptional checkpoint id. Resumes without replaying the whole session.
keepaliveSeconds between heartbeats. 15–120, default 30.

HTTP/3 is used when the client supports it. Sessions surviving several hours are routine, and the channel is deliberately chatty — heartbeats keep intermediaries from dropping an idle connection.

event: context
data: {"chunks":3,"bundle":"b_7Rm10sQwXz"}

event: checkpoint
data: {"id":"ck_20260718T0912","bytes":48211}

event: ping
data: {}

On disconnect, reconnect with since set to the last checkpoint id. Clients should back off exponentially from 1s to a 30s ceiling.

Service status

Service status

GET /api/v1/status

Unauthenticated. Safe to poll from a monitor at up to once a minute.

{
  "status": "operational",
  "region": "eu-north",
  "version": "0.4.2",
  "http3": true
}

The human-readable version lives at /status.

Errors

Errors are JSON and always carry the same shape. The code is stable and safe to branch on; the message is for humans and may be reworded.

{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API token",
    "docs": "https://rebornpad.dev/docs/api#auth"
  }
}
StatusCodeWhat to do
400invalid_requestFix the payload. The message names the offending field.
401unauthorizedToken missing, malformed, or still in the activation queue.
404not_foundCollection or bundle does not exist, or the bundle expired.
409dims_mismatchVector width differs from the collection's dims.
413payload_too_largeSingle record above 1 MB. Split the chunk.
429rate_limitedBack off. Retry-After is always present.
503capacityBeta capacity reached. Retry in a few minutes.

Rate limits

Limits are per token and generous enough that normal agent work does not hit them. They exist to stop a runaway loop from taking the region down.

LimitBeta
Requests600 per minute
Ingest volume25 GB per day
Collections20 per token
Chunks per collection2,000,000
Concurrent connections6
Bundle retention24 hours

Every response includes X-RateLimit-Remaining and X-RateLimit-Reset. Streaming connections count once at open, not per event. Full details are on the beta limits page.