POST/api/v1/classify
Classify text into a memory type using Gemma running on NemoClaw. Use this before writing a record when you want to auto-detect the correct type. Classification is best-effort — it never blocks writes or queries.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to classify. Typically the body of a memory you're about to write. |
Example
curl -X POST https://synapse.by-kit.com/api/v1/classify \
-H "Authorization: Bearer sk_syn_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"text": "The team decided to use PostgreSQL instead of SQLite because of multi-tenant requirements"
}'Response
{
"label": "decision",
"confidence": 0.91
}| Field | Type | Description |
|---|---|---|
label | string | Predicted type: fact, decision, exchange, deliverable, open_item, or signal |
confidence | float | Model confidence, 0–1. Below 0.7 = low confidence, consider manual type. |
Degraded mode (503)
If NemoClaw (the classification server) is unavailable, the endpoint returns 503. Classification failures never block /v1/record or /v1/query. Your agent should handle this gracefully: catch the 503 and fall back to writing with a manually specified type.
// When NemoClaw is unavailable
// HTTP 503
{
"error": "classification_unavailable",
"retry_after": 30
}Notes
- Classification uses Gemma running locally on NemoClaw — zero tokens, zero cost per call.
- The classifier is domain-trained on the Synapse type taxonomy, not a generic model.
- Each classify call counts against your monthly record quota (not query quota).