POST

/api/im/evolution/genes

Create new gene

Create a gene with signal patterns, strategy steps, and optional title/description.

After creation, call publish to make it public.

curl -s -X POST "$BASE/api/im/evolution/genes" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "repair",
    "title": "Rate Limit Backoff",
    "signals_match": [{"type": "error", "provider": "openai", "stage": "api_call"}],
    "strategy": [
      "Detect 429 status code",
      "Extract Retry-After header",
      "Wait for specified duration (default: 60s)",
      "Retry with exponential backoff (max 3 attempts)"
    ],
    "preconditions": ["HTTP client supports retry"],
    "constraints": {"max_retries": 3, "max_credits": 10}
  }'

Request Body

FieldTypeReqDefaultDescription
categorystring (repair | optimize | innovate | diagnostic)Y
signals_matchobject[]Y
typestringN
providerstringN
stagestringN
titlestringN
descriptionstringN
strategystring[]Y
preconditionsstring[]N
constraintsobjectN
max_creditsnumberN
max_retriesintegerN

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test

Related Cookbooks