Skip to main content

Using ReOpenly from an agent

An agent, a script or a CI job can run the whole platform with an API key: create projects, load data, train, host, serve, share, search and read billing. Three steps need a person, and a few account settings refuse an API key on purpose. This page lists both, then how to find and call everything else.

What needs a person​

StepWhyWhat an agent does instead
Create the accountSign-up happens in a browser and ends with the person accepting the Terms. That acceptance has to be theirs.Ask the person to sign up at reopenly.com.
Issue the first API keyThe first key is created from a signed-in session.Once it has one key, an agent can create, rotate and revoke keys itself with POST /api/v1/keys.
Pay for creditsPOST /api/v1/credits/checkout returns a payment page that a person completes.Hand the returned url to the person, then poll GET /api/v1/credits/checkout/status.

What an API key cannot change​

These answer 403 to an API key, so a leaked key cannot take over the account: your display name, password and email (PATCH /api/v1/me/profile, POST /api/v1/me/password, POST /api/v1/me/email and its verification step), and the privacy choices under /api/v1/me/preferences.

Find the API​

  • /llms.txt indexes the site, and /docs/llms.txt lists every public operation with a Markdown page each.
  • The OpenAPI document, in English and Portuguese. Every operation says what it does, when to use it and what it returns; every JSON request and response carries an example checked against the API; and an operation that needs no key says so with security: [].
  • GET /api/v1/me returns your workspace slug, the owner_slug in every project URL you own. GET /api/v1/base-models lists the models you can train and the bounds of every setting.

What an agent can do with a key​

JobMain operations
Use a base model, no projectGET /api/openai/v1/models, then POST /api/openai/v1/chat/completions or POST /api/openai/v1/embeddings (you pay per use; nothing is saved)
Curate chat dataPOST .../chats/bulk, GET .../tags
Curate embedding dataPOST .../datasets, POST .../examples, file imports
TrainGET .../training-jobs/estimate-messages or POST .../training-jobs/preview, then POST .../training-jobs and GET .../training-jobs/{job_id}
Control a runcancel before training starts, pause after, then resume or finish
Host and servePOST .../models, then the OpenAI-compatible routes
SharePOST .../models/{model_slug}/shares; recipients find it in GET /api/v1/models
SearchPOST .../search/indexes, then .../query
Collect training data from searchesPOST .../retrieval-events, then .../promote
Watch spendGET /api/v1/credits, GET /api/v1/credits/usage

Retry safely​

  • Inference: retry automatically only when the error code is model_warming or overloaded. Anything else is permanent, your mistake, or a request that may already have been billed.
  • Training: POST .../training-jobs takes no idempotency key. An account runs one unfinished training job at a time, so a second start answers 409 training_slot_occupied; after a timeout, list the jobs before trying again. .../resume and .../retry require an Idempotency-Key header.
  • Checkout: send a fresh Idempotency-Key per purchase attempt.
  • Imports: .../confirm takes an idempotency_key in the body.
  • Recorded searches: the event_id is the idempotency key; replaying the same body returns 200.

Every /api/v1 error is {"detail": {"code", "message"}}: branch on code and show message. See Errors.