Skip to content

Evolution API

The Evolution API (Level 1.5) exposes Rotifer’s public gene registry and arena data to external systems. Use it to build recommendation layers, monitoring dashboards, or custom tooling on top of Rotifer’s evolutionary infrastructure.

https://api.rotifer.dev/v1

All public endpoints are read-only GET endpoints. Each request must send an API key with the read scope in the X-API-Key header:

Terminal window
curl -H "X-API-Key: YOUR_KEY" https://api.rotifer.dev/v1/genes

Keys are created and managed from the CLI:

Terminal window
rotifer login
rotifer api-key create --name "My Read Key"
rotifer api-key list
rotifer api-key revoke --prefix rk_abcd12

Rate limits are stored per API key. The default create flow uses 30/min, but individual keys can be provisioned with a different per-minute limit.

Search and discover genes with arena ranking data.

ParameterTypeDefaultDescription
domainstringFilter by gene domain, for example content.qa
fidelitystringFilter by Wrapped, Hybrid, or Native
sortstringfitnessSort by fitness, reputation, or downloads
limitinteger20Results per page, max 50
offsetinteger0Pagination offset

Example

Terminal window
curl -H "X-API-Key: YOUR_KEY" \
"https://api.rotifer.dev/v1/genes?domain=content.qa&sort=fitness&limit=5"

Response

{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "doc-retrieval",
"domain": "content.qa",
"fidelity": "Hybrid",
"description": "Document retrieval with semantic search",
"fitness_score": 0.92,
"reputation_score": 0.85,
"owner": "alice",
"downloads": 342,
"arena_rank": 1,
"arena_history": [
{
"fitness_value": 0.92,
"evaluated_at": "2026-03-24T00:00:00Z",
"total_calls": 1500
}
]
}
],
"total": 12,
"limit": 5,
"offset": 0
}

Fetch the complete public phenotype for a specific gene, including install instructions and compatibility info.

ParameterTypeDescription
idUUID (path)Gene UUID

Example

Terminal window
curl -H "X-API-Key: YOUR_KEY" \
"https://api.rotifer.dev/v1/genes/550e8400-e29b-41d4-a716-446655440000/phenotype"

Response

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "doc-retrieval",
"domain": "content.qa",
"fidelity": "Hybrid",
"phenotype": {
"input": { "type": "object", "properties": { "query": { "type": "string" } } },
"output": { "type": "object", "properties": { "results": { "type": "array" } } }
},
"fitness_score": 0.92,
"reputation_score": 0.85,
"install_command": "npx @rotifer/playground install doc-retrieval",
"compatibility": {
"min_playground_version": "0.7.0",
"required_fidelity": "Hybrid"
}
}

Get evolution health metrics for a domain. This endpoint is useful for monitoring ecosystem diversity and gene competition dynamics.

ParameterTypeDescription
domainstring (required)Domain to analyze

Example

Terminal window
curl -H "X-API-Key: YOUR_KEY" \
"https://api.rotifer.dev/v1/arena/insights?domain=content.qa"

Response

{
"domain": "content.qa",
"gene_count": 8,
"shannon_diversity": 2.322,
"turnover_rate": 0.2,
"top_genes": [
{ "name": "doc-retrieval", "fitness": 0.92, "trend": "stable" },
{ "name": "answer-synth", "fitness": 0.87, "trend": "rising" }
],
"avg_fitness": 0.65,
"total_arena_evaluations": 4200
}
MetricDescription
shannon_diversityShannon entropy H'. Higher values indicate healthier competition.
turnover_rateFraction of top-5 genes replaced in the last 30 days.
trendFitness trajectory based on recent arena evaluations: rising, stable, or declining.

All errors use a consistent shape:

{
"error": "Human-readable error message",
"code": "MACHINE_READABLE_CODE"
}
HTTP StatusCodeDescription
400INVALID_ID / MISSING_PARAMMalformed request
401UNAUTHORIZEDInvalid or missing API key
404NOT_FOUNDResource not found
405METHOD_NOT_ALLOWEDOnly GET is supported
429RATE_LIMITEDRate limit exceeded
502DB_ERRORUpstream database error
API endpointProtocol interfaceSpec section
GET /v1/genesGeneRegistry.query() + SemanticDiscovery.discoverByNeed()§8.2
GET /v1/arena/insightsArena Data Transparency + ArenaSummary§9.7.1, §41.2
GET /v1/genes/{id}/phenotypePhenotype Public tier§4.2

These endpoints are tagged nonstandard per §25.4 because they are specific to the Cloud Binding implementation.