Skip to main content

Hosted model aliases

On this page you host a trained model under a stable name, point that name at a newer training result, share it, and call it.

A hosted model is a stable, project-local name for a trained model; the API calls it an alias. Callers use its slug as model, so you can retrain and re-point it without changing any client. Creating one does not reserve a dedicated GPU.

Host a trained model​

Once a training job's model_available is true, host it with POST /api/v1/projects/{owner_slug}/{project_slug}/models. Give it a display name, a slug and a source that names the job by its id:

{
"name": "Support assistant",
"slug": "support-assistant",
"source": {"kind": "training_job", "training_job_id": 87}
}

An embedding job is hosted the same way. No evaluation is required first:

{
"name": "Support encoder",
"slug": "support-encoder",
"task": "embedding",
"source": {"kind": "training_job", "training_job_id": 92}
}

task is optional: the hosted model takes the task of the job it points at. If you send task and it does not match the job, the response is 409 model_task_source_mismatch, naming both tasks. A job trained on a retired base, or one without a published model, is refused with 409. A slug cannot contain # or start with ReOpenly/.

A top-level "training_job_id": 87 without source is still accepted for older clients and means the same as the training_job source; new clients send source.

Note. source also accepts {"kind": "provisioned_artifact", "model_artifact_id": 101} for an embedding model provisioned to your project rather than trained by you. The model's catalog id and origin are set by ReOpenly; a client cannot submit a repository URL or branch.

In the app, Host model on a finished training job opens the same dialog for text and embedding projects: choose a new hosted model or an existing one, then review the suggested name and API slug. The receipt shows the saved hosted model and its status until you select Done.

Point it at a new training result​

To publish a newer training result without changing the client-facing slug, update the hosted model with PUT .../models/{model_slug} (PATCH accepts the same body). Name and slug stay the same:

{
"source": {"kind": "training_job", "training_job_id": 95},
"expected_revision": 3
}

Each re-point increments the hosted model's revision. Send the revision you last read as expected_revision: if someone changed the hosted model since, the update answers 409 model_revision_conflict with expected_revision and actual_revision, and nothing changes. Read it again and decide. Without expected_revision, the update applies to whatever is current. The legacy top-level training_job_id is accepted here too, but not together with source.

Re-pointing keeps the same task. For an embedding model, a new target with a different vector size or normalization makes existing vector indexes incompatible: check GET .../models/{model_slug}/target-compatibility, then send index_compatibility_acknowledged: true, or the update answers 409 embedding_index_compatibility_required. Re-pointing a disabled hosted model keeps it disabled. Every request is served by exactly the adapter the hosted model points at.

Call it​

Use the slug as model at the project's OpenAI-compatible URL, https://reopenly.com/api/projects/{owner_slug}/{project_slug}/openai/v1, with any OpenAI SDK. A text model answers chat completions:

from openai import OpenAI

client = OpenAI(
base_url="https://reopenly.com/api/projects/{owner_slug}/{project_slug}/openai/v1",
api_key="fnf_your_api_key",
timeout=300,
)
completion = client.chat.completions.create(
model="support-assistant",
messages=[{"role": "user", "content": "How do returns work?"}],
)
print(completion.choices[0].message.content)

An embedding model answers embeddings. Send input_type: "query" for queries and "document" for passages, so a model trained with a query instruction applies it to queries only:

from openai import OpenAI

client = OpenAI(
base_url="https://reopenly.com/api/projects/{owner_slug}/{project_slug}/openai/v1",
api_key="fnf_your_api_key",
)
response = client.embeddings.create(
model="support-encoder",
input=["How long is the warranty on the X200?"],
extra_body={"input_type": "query"},
)
print(len(response.data[0].embedding))

The 5-minute timeouts in the text examples leave room for a text model that is starting after a quiet period. The OpenAI-compatible API lists every field these calls accept, streaming, limits and timeouts.

ReOpenly resolves the hosted model to its owner and payer and serves exactly the verified adapter it points at. A missing or invalid adapter never silently falls back to the base model. Serving follows model_available and the published model: a source job that ended cancelled but kept a model is served, and a cancelled job without one is refused.

Send the training system prompt​

A text model trained with a system prompt answers best when every request sends that prompt as its first message (see Call it with the system prompt it was trained with). Your own reads of the model carry it as training_system_prompt: the project's model list and single-model reads, and your rows in GET /api/v1/models. The hosted model page shows it with a copy button, and the "Use model" snippet sends it before your message. ReOpenly never adds it to a request for you.

It is your data, so people you share the model with, and callers of a public model, never receive it: their rows carry training_system_prompt: null. Access to the model itself is unchanged. If they need it, give it to them.

Share it​

A hosted model is owner-only until you share it with selected accounts or make it public.

Private shares​

Create a share with POST .../models/{model_slug}/shares, naming the account and who pays:

{
"user_slug": "alex",
"payer": "user",
"extra_charge_percent": 10
}

payer is exactly owner or user. With owner, usage is charged to you; with user, the recipient must have enough balance and pays the base inference charge plus extra_charge_percent (0 to 100). Listing and deleting shares are owner-only. Revoking a share with DELETE .../models/{model_slug}/shares/{share_id} returns 200 with {"status":"deleted"}.

Public access​

Update the hosted model with is_public and public_extra_charge_percent. Public callers pay their own inference charge plus that surcharge (0 to 100). Changing sharing never enables a disabled hosted model: only /enable does.

What recipients call​

A recipient calls the model at the owner's project URL, not their own. GET /api/v1/models lists every hosted model the caller can use, with owner_slug, project_slug and access (owner, shared or public) on each row:

curl "https://reopenly.com/api/v1/models?access=shared" \
-H "Authorization: Bearer $REOPENLY_API_KEY"

With owner_slug: "acme" and project_slug: "support", the recipient calls https://reopenly.com/api/projects/acme/support/openai/v1/chat/completions (or /embeddings) with "model": "support-assistant" and their own API key. A caller who cannot use a model gets the same model_not_found response as for a slug that does not exist, so slugs cannot be guessed.

Download a provisioned model​

GET /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/download-metadata
GET /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/download

For a hosted embedding model with a provisioned_artifact source, download-metadata returns the verified file hashes and sizes, and download streams those files as a gzip-compressed tar archive named <model_slug>-weights.tar.gz. Any other hosted model, such as a text model, answers 409 model_task_mismatch. A model you trained downloads as its adapter from its training job; see Training jobs.

Base models​

Base models belong to no project. Hosted models lists all of them for every account, including a new account with no project, each once under its public id: ReOpenly/Qwen3.5-9B, ReOpenly/Qwen3-Embedding-0.6B and ReOpenly/Qwen3-Embedding-4B. Use a base without hosting or fine-tuning anything. Use model supplies Python, cURL and JavaScript examples that call it at /api/openai/v1, charged to your account. Inside a project, its Hosted models page lists the bases of the project's type with the project URL instead, so the project's inference auto-save applies. Embedding bases support Search, Vector and Similarity without a hosted model. Availability depends on whether the base is currently being served.

Embedding base Use model examples omit input_type: public bases have no query instruction to apply. Hosted examples explicitly set input_type to query for trained query instructions. Python sends this through extra_body={"input_type": "query"}; cURL and JavaScript include input_type in the request body. To embed corpus passages with a hosted model, choose document. The API still accepts the optional role for bases.

Reference​

GET /api/v1/projects/{owner_slug}/{project_slug}/models
POST /api/v1/projects/{owner_slug}/{project_slug}/models
PUT /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}
PATCH /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}
GET /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/target-compatibility
GET /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/download-metadata
GET /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/download
POST /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/disable
POST /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/enable
GET /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/shares
POST /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/shares
DELETE /api/v1/projects/{owner_slug}/{project_slug}/models/{model_slug}/shares/{share_id}
GET /api/v1/models

Listing and pagination​

A project's hosted models always use a bounded cursor page:

GET /api/v1/projects/{owner_slug}/{project_slug}/models?limit=25
GET /api/v1/projects/{owner_slug}/{project_slug}/models?limit=25&cursor=<next_cursor>

Responses are {data, next_cursor, total_count}. The default limit is 25 and the maximum is 100. Cursors are opaque, belong to this project and must be sent back unchanged. Authorization and filters are applied before the page, so following next_cursor reaches every hosted model you are allowed to see.

GET /api/v1/models lists across projects with the same cursor and limits, and filters on the server by project_slug, status (active, disabled, deprecated), access and include_archived_projects. It returns {data, next_cursor, totals}; totals holds usage rollups. A row's spend_mtd_credits is null when the model served requests whose charges do not name it: that means not recorded, not free.

Deprecation​

The catalog is authoritative. A fine-tune trained on a retired base is marked deprecated: true in training and model responses, cannot be newly hosted or re-pointed, and returns 410 with error.code = "model_deprecated" when called. Downloads remain available so you can migrate or audit your data. See Model lifecycle for every effect and how to move to a current base.

Project archives​

Archiving is reversible and does not delete chats, jobs, hosted models or their files. Archived projects are read-only: writes return the regular project-archive conflict, while OpenAI-compatible inference returns:

{
"error": {
"type": "invalid_request_error",
"code": "project_archived"
}
}

The response is 404 with no Retry-After, because an archive is a deliberate owner action rather than a transient outage. Unarchive the project from project settings before serving again.

Evaluation fields​

Training validation chooses a checkpoint; it is not a measure of served quality. evaluation_receipt_sha256 and evaluation_acknowledged are still accepted on create and update for older clients and are ignored; neither is required to host a model.