Studio API
Studio is the creator dashboard for managing REPLRs — analytics, versioning, A/B testing. Use these endpoints to monitor performance, iterate on instructions, run experiments, and publish to the marketplace.
https://api.replr.ai/v1Analytics
/v1/studio/:replr_id/analyticsAuth RequiredRetrieve analytics for a REPLR including message volume, unique users, average rating, and retention rate.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
period | string | Optional | Time window for the analytics snapshot. One of "7d", "30d", or "90d". Defaults to "30d". |
Response
{
"id": "an_8v2kLmNpQr",
"replr_id": "rp_4xTgHjKlMn",
"period": "30d",
"message_count": 14832,
"unique_users": 573,
"avg_rating": 4.72,
"retention_rate": 0.68,
"daily_breakdown": [
{
"date": "2026-03-09",
"messages": 512,
"users": 87
},
{
"date": "2026-03-08",
"messages": 489,
"users": 79
}
],
"generated_at": "2026-03-09T14:23:11Z"
}Versions
/v1/studio/:replr_id/versionsAuth RequiredList all instruction versions for a REPLR, ordered by creation date descending.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
Response
{
"data": [
{
"id": "ver_9wXyZaBcDe",
"version": 3,
"status": "active",
"instructions": "You are a friendly coding mentor who explains concepts with real-world analogies...",
"changelog": "Added analogy-based explanations and follow-up question prompts.",
"created_at": "2026-03-08T10:15:00Z",
"activated_at": "2026-03-08T10:22:34Z"
},
{
"id": "ver_7uVwXyZaBc",
"version": 2,
"status": "inactive",
"instructions": "You are a coding mentor. Answer questions about programming clearly...",
"changelog": "Simplified tone for beginner audience.",
"created_at": "2026-02-20T08:30:00Z",
"activated_at": "2026-02-20T08:31:12Z",
"deactivated_at": "2026-03-08T10:22:34Z"
}
],
"total": 3
}/v1/studio/:replr_id/versionsAuth RequiredCreate a new instruction version. The new version is not active until explicitly activated.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
instructions | string | Required | The full instruction text for this version. |
changelog | string | Optional | A short description of what changed in this version. |
Response
{
"id": "ver_1fGhIjKlMn",
"version": 4,
"status": "draft",
"instructions": "You are an enthusiastic coding mentor. Use Socratic questioning to guide learners...",
"changelog": "Switched to Socratic method for deeper engagement.",
"created_at": "2026-03-09T14:30:00Z",
"activated_at": null
}/v1/studio/:replr_id/versions/:version_id/activateAuth RequiredActivate a specific version, making it the live instruction set. The previously active version is automatically deactivated.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
version_id | string | Required | The unique identifier of the instruction version. |
Response
{
"id": "ver_1fGhIjKlMn",
"version": 4,
"status": "active",
"instructions": "You are an enthusiastic coding mentor. Use Socratic questioning to guide learners...",
"changelog": "Switched to Socratic method for deeper engagement.",
"created_at": "2026-03-09T14:30:00Z",
"activated_at": "2026-03-09T14:35:22Z"
}Test Chat
/v1/studio/:replr_id/test-chatAuth RequiredSend a test message to your REPLR without publishing. Useful for previewing how a draft version behaves before going live.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Required | The user message to send to the REPLR. |
version_id | string | Optional | Target a specific version. If omitted, uses the currently active version. |
Response
{
"id": "tmsg_3pQrStUvWx",
"replr_id": "rp_4xTgHjKlMn",
"version_id": "ver_1fGhIjKlMn",
"input": "What is a closure in JavaScript?",
"output": "Great question! Imagine a backpack. When a function is created inside another function, it carries a backpack with all the variables from its parent scope...",
"model": "replr-4o",
"latency_ms": 842,
"tokens": {
"input": 126,
"output": 203
},
"created_at": "2026-03-09T14:40:05Z"
}A/B Test Variants
/v1/studio/:replr_id/variantsAuth RequiredList all A/B test variants for a REPLR, including traffic allocation and performance metrics.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
Response
{
"data": [
{
"id": "var_5nOpQrStUv",
"name": "Control — Friendly Mentor",
"instructions": "You are a friendly coding mentor who explains concepts with real-world analogies...",
"traffic_percentage": 50,
"metrics": {
"message_count": 7416,
"avg_rating": 4.72,
"retention_rate": 0.68
},
"created_at": "2026-03-01T09:00:00Z"
},
{
"id": "var_6oQrStUvWx",
"name": "Variant A — Socratic Method",
"instructions": "You are a coding mentor who uses Socratic questioning to guide learners...",
"traffic_percentage": 50,
"metrics": {
"message_count": 7389,
"avg_rating": 4.81,
"retention_rate": 0.73
},
"created_at": "2026-03-01T09:00:00Z"
}
],
"total": 2
}/v1/studio/:replr_id/variantsAuth RequiredCreate a new A/B test variant. Traffic is split across all active variants according to their percentage allocations.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | A human-readable name for this variant (e.g. "Variant B — Concise Style"). |
instructions | string | Required | The instruction text for this variant. |
traffic_percentage | number | Required | Percentage of traffic to route to this variant (0-100). The sum across all variants must equal 100. |
Response
{
"id": "var_7pStUvWxYz",
"name": "Variant B — Concise Style",
"instructions": "You are a coding mentor. Keep answers under 3 sentences. Use bullet points for steps...",
"traffic_percentage": 33,
"metrics": {
"message_count": 0,
"avg_rating": null,
"retention_rate": null
},
"created_at": "2026-03-09T15:00:00Z"
}/v1/studio/:replr_id/variants/:variant_idAuth RequiredUpdate the traffic allocation for an existing A/B test variant.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
variant_id | string | Required | The unique identifier of the A/B test variant. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
traffic_percentage | number | Required | New traffic percentage for this variant. Adjust other variants so the total equals 100. |
Response
{
"id": "var_7pStUvWxYz",
"name": "Variant B — Concise Style",
"instructions": "You are a coding mentor. Keep answers under 3 sentences. Use bullet points for steps...",
"traffic_percentage": 25,
"metrics": {
"message_count": 1204,
"avg_rating": 4.65,
"retention_rate": 0.61
},
"updated_at": "2026-03-09T16:10:00Z"
}Publishing
/v1/studio/:replr_id/publishAuth RequiredPublish a REPLR to the marketplace, making it discoverable by other users. Requires an active version.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replr_id | string | Required | The unique identifier of the REPLR. |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
category | string | Required | Marketplace category. One of "productivity", "education", "entertainment", "lifestyle", "developer-tools", or "other". |
tags | string[] | Required | Up to 5 tags for discoverability (e.g. ["coding", "mentor", "javascript"]). |
pricing | string | Required | Pricing model. Either "free" or "premium". Premium REPLRs earn revenue share from subscriber usage. |
Response
{
"id": "pub_8qUvWxYzAb",
"replr_id": "rp_4xTgHjKlMn",
"status": "published",
"category": "education",
"tags": [
"coding",
"mentor",
"javascript"
],
"pricing": "free",
"marketplace_url": "https://replr.ai/marketplace/rp_4xTgHjKlMn",
"published_at": "2026-03-09T16:30:00Z"
}