Playground and Search
On this page you try a model before you build on it: chat with a text model, embed and compare texts with an embedding model, and search a whole dataset.
In a text project the Playground is a chat: you talk to a base or hosted
model, keep the conversation, and save the turns you want as training data. In
an embedding project you have two tools: the Playground, which embeds and
compares a few texts, and Search, which ranks the passages of a whole
dataset against a query. Both call the same model and are billed like
/embeddings calls.
Text playground
Open Playground in a text project, or open the global Playground and its Text tab. Each message you send is an ordinary chat completion request and is billed the same way. A base model can run with no project selected; that run is charged to your account.
Once a conversation has a turn, its model, project and parameters (temperature, max tokens, streaming and reasoning effort) are fixed. Choose New chat to change them.
The training system prompt
When you pick one of your own fine-tunes that was trained with one system prompt, the System prompt field starts with that prompt, and the line under it says where it came from. It is sent once, before your first message, and saved with the conversation, exactly like a prompt you type: nothing is added on the server. You can edit it or choose Clear; an edited field offers Restore training prompt. Sending with the field empty shows a short notice above Send, because a fine-tune called without the prompt it was trained with can ignore the task or answer in another language. Send still works.
The field stays empty when the run used several system prompts (the line says how many), when it was trained without one, and for runs from before the prompt was recorded. Switching model updates the field only while you have not typed in it. A model shared with you, or a public one, never shows its owner's prompt; ask the owner for it. For a fixed set of labels, set temperature to 0.
Conversation history
Conversations are kept on the server, not in your browser, and are listed in History. A project's Playground lists that project's conversations; the global Playground lists your whole account. Deleting a conversation removes it and its turns for good. It does not refund the requests, and it does not delete a chat you saved from it.
Create and replace take the whole conversation every time, so a retried write cannot duplicate a turn:
{
"messages": [
{"role": "user", "content": "How do returns work?"},
{"role": "assistant", "content": "Returns are free within 30 days."}
],
"project_owner_slug": "acme",
"project_slug": "support",
"model_ref": "support-assistant"
}
A conversation holds up to 200 turns. Each turn is user, assistant or
system and up to 32,000 characters; only an assistant turn may be empty.
title (up to 80 characters) defaults to the first line of the first user
turn. An empty messages list is refused with 422. PUT replaces the stored
turns, and DELETE answers 204. The list returns summaries without turns;
read one conversation to get its messages.
A write that records a request can also carry the settings it ran with:
temperature, max_tokens, stream, and reasoning_effort when you chose
one. The first settings are kept. If a later turn ran with different ones, the
conversation reports parameters_varied: true rather than overwriting them.
When these fields are null, the settings were not recorded; they are not
empty values.
Scope and refusals
project_owner_slug and project_slug are a pair. Send them as query
parameters to list, read, replace or delete, and in the body of a write.
- Send neither to work across your account, or both to work inside one
project. Sending only one answers
422 playground_scope_invalid. - A scoped list shows only the conversations recorded in that project. A
project that does not exist, or holds none of your conversations, returns
an empty page. A conversation outside the scope answers
404, the same as one that does not exist. - A conversation records the project that served it, once. Your own project is
recorded as sent. Another account's project is recorded only when
served_model_refnames a shared or public hosted model there that you can use; otherwise the conversation stays unscoped and appears only in account-wide history. The response shows what was recorded. - A replace whose body names a different project from its query, or that would
move a conversation already recorded in another project, answers
409 playground_session_scope_mismatch. - The model is fixed after the first turn: a replace with a different
model_refanswers409 playground_session_model_mismatch. - A conversation cannot switch between text and embedding history: a replace
that tries answers
409 playground_session_kind_mismatch.
Every refusal has the body {"detail": {"code", "message"}}.
Save as dataset
Save as dataset turns the conversation into a selection: a checkbox
beside each turn, all ticked. Untick what you do not want and choose Save to
dataset. The selected turns become one chat in the dataset of the project
that served the conversation, with source=playground and the tag
playground (see Dataset chats). Saved turns keep a
Saved mark.
A later save (Update dataset row) updates the same chat instead of adding a second copy, which would double that conversation's weight in training. Turns added since the last save are offered ticked; turns you left out stay out. Selecting a reply without the turn it answers shows a warning but is allowed. Editing or deleting the saved chat on the dataset screen does not change the conversation or its marks.
Through the API, the link lives on the conversation: dataset_chat_id,
dataset_message_positions (the saved turn positions) and
dataset_saved_through (how many turns existed at the last save). A write
replaces the whole record, so send all three on every write; omitting them
clears the link.
Embedding playground
From Hosted models, choose Use model, then Open in Playground to open that project with the selected embedding model. Opening the Playground does not send an inference request; use Compare, Embed, or Search to run one.
The global Playground also offers Text and Embeddings tabs. Base
models need no project: in Text, a base model sends with no project
selected, and in Embeddings, No project: base models only runs
Similarity and Vector on ReOpenly/Qwen3-Embedding-0.6B and
ReOpenly/Qwen3-Embedding-4B. This is the default when you have no embedding
project. Those runs are charged to your account. Choose an embedding project in
Parameters to use its hosted models and Search. The selected task and
project are kept in the URL.
The mode selector always shows Search, Similarity, and Vector. Search is disabled with an explanation if indexing is unavailable or the project has no available embedding model. Public bases work without fine-tuning or creating a hosted model (the API calls a hosted model an alias): Similarity and Vector with or without a project, and Search inside a project, because it ranks that project's dataset. Similarity includes refunds and API-access examples. Choosing an example only fills the inputs; pressing Compare sends the metered inference request. Dimensions, normalization and query instructions follow the served model and are not per-request overrides. The Base model badge identifies a catalog model.
Vector takes {model, input, input_type} and returns the vectors for your
texts, with the exact model revision (target) that produced them and the
effective instruction. input is one text or a list of 1 to 8 texts.
input_type is query or document; a model trained with a
query_instruction applies it to queries only.
Similarity takes {model, source, documents}, with 1 to 8 documents,
and returns the cosine similarity of each document to the query, in input
order. It embeds the query and then the documents, in batches, and each
batch is billed as an embedding request: usage.billable_requests says how
many. If a later request fails, the earlier ones may still be charged. Vector
is billed the same way.
These limits are the Playground's own and are lower than the
/embeddings limits. Every text must
also fit the model's input length; all texts are checked before the first
billed request, so one text that is too long refuses the whole run with
nothing charged.
Search
Search ranks the passages of one embedding dataset against a query. You build an index of the dataset once, then query it as often as you like.
Build an index
In the app, select a dataset by name in Corpus and choose Build index.
Through the API, find the dataset with GET .../search/corpora, which lists
active embedding datasets with their example_count and current
selection_sha256, then send its id, the model and a spending ceiling
(credit_ceiling, in US dollars): the most you allow this build to spend, at
most $100.
curl -X POST "https://reopenly.com/api/v1/projects/acme/support/search/indexes" \
-H "Authorization: Bearer $REOPENLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"dataset_id": 42, "model": "support-encoder", "credit_ceiling": "2.5"}'
The response (201) is the index, starting queued:
{"id": 15, "status": "queued", "stale": null, "dataset_id": 42, "dataset_version_id": 311, "model": "support-encoder", "dimensions": 1024, "passage_count": 0, "embedded_count": 0, "credit_ceiling": "2.5", "spent_credits": "0", "failure_code": null}
The build captures the dataset as it is now, without a training run or a
train/evaluation split, and embeds every distinct positive and negative
passage with the model you chose, in batches billed at that model's ordinary
rate. Each batch appears in your statement. Building stops sending
batches once the spend reaches the ceiling; a batch already running may finish
slightly past it. Poll GET .../search/indexes and read the index's status,
embedded_count and spent_credits.
What a build costs. About the passages' input tokens times the model's
price per million input tokens, times the fine-tune multiplier on a fine-tuned
model (see Pricing and billing). Each
passage counts at most 512 tokens. For example, 377 passages of about 330
tokens each (125,332 tokens) on ReOpenly/Qwen3-Embedding-0.6B at $0.009 per
million come to about $0.0011, or about $0.0016 on a fine-tune of it at
1.45x. The spending ceiling is the most a build may spend, not its price: a
$1 ceiling on that index is several hundred times what it costs. Before you
build, the app shows the expected cost beside the ceiling, and
GET .../search/estimate?dataset_id=42&model=support-encoder returns it
(passage_count, input_tokens, estimated_credits in US dollars) without
embedding or charging anything. The engine's token count is what is billed,
so the charge can differ slightly from the estimate.
status | Meaning |
|---|---|
queued | Waiting to build, or waiting to retry after a temporary failure (failure_code says why). |
building | Embedding passages. |
ready | Searchable. stale: true means the model or dataset version changed, and the index refuses queries. |
failed | The build stopped; failure_code says why, for example search_credit_ceiling_reached. |
cancelled | You stopped the build. |
You can also send dataset_version_id for an existing snapshot instead of
dataset_id; send exactly one of the two. GET .../search/versions lists the
snapshots and the Search limits.
Query an index
Send query and an optional top_k (1 to 20, default 10):
curl -X POST "https://reopenly.com/api/v1/projects/acme/support/search/indexes/15/query" \
-H "Authorization: Bearer $REOPENLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"query": "How do I resume a paused fine-tune?", "top_k": 5}'
{
"index_id": 15,
"query_instruction": null,
"results": [
{"rank": 1, "ordinal": 7, "text": "Resume continues a run from its last checkpoint.", "example_id": 441, "role": "positive", "truncated": false, "score": 0.83}
],
"usage": {"input_tokens": 11, "billable_requests": 1}
}
Each query embeds your text once (one ordinary billed request) and ranks every
passage in the index exactly: by cosine similarity, or by dot product for a
model trained without normalization. Each result names the pair it came from
(example_id), its role in that pair, and whether the passage was cut to the
model's input length (truncated). An index that is not ready answers
409 search_index_not_ready, and a stale one 409 search_index_stale.
Keep an index current
Dataset edits do not change an existing index or start a billed rebuild.
The Playground shows Dataset changed when the dataset's current
selection_sha256 differs from the indexed snapshot. Choose Update index
and approve a spending ceiling to capture and embed the new contents. The old
index remains available until deleted and keeps counting against the storage
quota.
Only one index can build at a time in a project, including a queued build waiting to start. Switching model or Corpus does not free that slot. The Playground identifies a blocking build outside your current selection and offers Stop indexing; Build and Update remain disabled until that build stops or finishes. You can also stop a build from the index inventory under Snapshot details.
Stop indexing (POST .../search/indexes/{index_id}/cancel) works on a
queued or building index, even when indexing or embedding serving is
unavailable. It marks the index cancelled and prevents automatic retries. A
batch already started may finish computing, but its late response cannot add
vectors or a charge after cancellation. Charges already made remain visible,
with the partial progress. Stopping does not release storage: delete the
index when you no longer need it. Repeating Stop is safe; a ready or failed
index answers 409 search_index_not_building.
Stale indexes. If a public base changes or becomes unavailable, or the
hosted model is pointed at another model, disabled or changed, or the dataset
version is no longer available, the index is reported stale and refuses
queries: delete it and build a new one. Deleting an index
(DELETE .../search/indexes/{index_id}) removes its passages and vectors at
once; what was already spent is not refunded. A failed index keeps counting
against the storage quota until you delete it.
Model identity. Use a public ID such as ReOpenly/Qwen3-Embedding-0.6B
or a hosted model's slug in the same model field. A base index returns
saved_model_id: null, base_model_artifact_id and its public model ID; an
index on a hosted model returns its integer saved_model_id. Both pin the
exact model and its settings, and share ownership, billing, quotas and
cancellation.
Saved requests
Successful Search, Similarity and Vector requests save their inputs, model, settings and returned results in History. They remain available after you leave the page or reload. Open a saved request to restore its results without sending another inference request or adding another inference charge. Saved Search results remain a snapshot even if the dataset or index later changes.
Use the delete button beside a history entry to remove its saved inputs and results. This does not delete a Search index, dataset or model, or refund the original inference charge. History is private to your account and project, stays until you delete it, and can be read or deleted when serving is unavailable. If saving fails, the result stays visible and Retry saves it without rerunning inference.
The shared session API accepts a typed embedding_run containing mode,
model, mode-specific inputs and result (maximum 2 MB). These are
client-recorded snapshots, not independently verified billing or quality
records. List responses expose embedding_mode, but omit inputs and results;
read one session to retrieve them.
Reference
GET /api/v1/playground/sessions
POST /api/v1/playground/sessions
GET /api/v1/playground/sessions/{session_id}
PUT /api/v1/playground/sessions/{session_id}
DELETE /api/v1/playground/sessions/{session_id}
POST /api/v1/projects/{owner_slug}/{project_slug}/playground/embeddings/vector
POST /api/v1/projects/{owner_slug}/{project_slug}/playground/embeddings/similarity
POST /api/v1/playground/embeddings/vector (base models, no project)
POST /api/v1/playground/embeddings/similarity (base models, no project)
GET /api/v1/projects/{owner_slug}/{project_slug}/search/corpora
GET /api/v1/projects/{owner_slug}/{project_slug}/search/versions
GET /api/v1/projects/{owner_slug}/{project_slug}/search/indexes
POST /api/v1/projects/{owner_slug}/{project_slug}/search/indexes
POST /api/v1/projects/{owner_slug}/{project_slug}/search/indexes/{index_id}/query
POST /api/v1/projects/{owner_slug}/{project_slug}/search/indexes/{index_id}/cancel
DELETE /api/v1/projects/{owner_slug}/{project_slug}/search/indexes/{index_id}
Search limits. One index holds at most 20,000 passages, and a project's
indexes share 256 MB of vector storage. Stored vectors have no separate
charge. GET .../search/versions returns the current values as
limits.max_index_passages, limits.project_vector_bytes_quota,
limits.project_vector_bytes_used, limits.max_credit_ceiling and
limits.max_top_k. A spending ceiling above the maximum answers
422 search_credit_ceiling_invalid.
Session history pagination. GET /api/v1/playground/sessions always
returns {data, next_cursor, total_count}. Use limit (default 25, maximum
100) and pass cursor=<next_cursor> for the next page. Lists omit message
bodies and can be filtered by the owner/project pair. Use task=embedding or
task=text_generation to separate the two histories; omitting task lists
both. A cursor belongs to its original task and scope.
If Search or the Playground is not available for your project, the API answers
409 project_capability_mismatch. Every field of these requests and responses
is in the API reference.