API documentation
Run the same analysis as the workspace from your own software. Every successful call costs €0.05 and is charged to the Sensifai wallet of the person who created the key. Unsuccessful calls are free.
1. Create a key
Sign in, open the workspace and go to API keys. Give the key a name and, if you like, a monthly cap. The key is shown once. It looks like stainrescue_live_… and only works for StainRescue.
2. Call the endpoint
POST https://stainrescue.sensifai.com/api/v1/run
Authorization: Bearer YOUR_KEY (or X-API-Key: YOUR_KEY)
Content-Type: application/json
{
"mode": "stain_sos",
"stainState": "fresh",
"note": "Fresh espresso spilled on a cream merino wool sweater five minutes ago."
}3. Read the result
{
"id": "run_7f3c2a91",
"result": {
"mode": "stain_sos",
"headline": "Fresh red wine on cream linen",
"detectedFabric": "Woven cream linen",
"detectedStainOrFocus": "Fresh tannin spill (red wine)",
"confidence": "High",
"safetyScore": 86,
"safetyReason": "Fresh tannin on sturdy plant-fiber linen lifts cleanly when kept cool and blotted instead of rubbed.",
"proDryCleanRequired": false,
"proDryCleanNote": null,
"doNotDo": [
"Do not use hot water or put the shirt in a warm dryer—heat bonds wine tannins into linen fibers.",
"Do not scrub hard with a colored towel, which spreads the ring and transfers dye.",
"Do not use chlorine bleach on cream or unbleached linen—it turns fibers yellow."
],
"rescueSteps": [
{
"step": 1,
"title": "Blot excess wine straight up",
"detail": "Press clean white paper towels or a plain white cotton cloth over the spill to absorb pooling liquid without rubbing.",
"waitTime": "Now"
},
{
"step": 2,
"title": "Flush from the back with cold water",
"detail": "Hold the stained side over a sink and run cold tap water through the back of the fabric to push tannins out rather than deeper in.",
"waitTime": "2 min"
},
{
"step": 3,
"title": "Dab mild liquid dish soap and cold water",
"detail": "Work a drop of clear dish soap gently with fingertips from the outer edge inward, then rinse cold.",
"waitTime": "5 min"
},
{
"step": 4,
"title": "Soak in cool water with oxygen cleaner if faint tint remains",
"detail": "If a pink shadow stays visible, soak 30 minutes in cool water before a cold gentle wash and air dry.",
"waitTime": "30 min"
}
],
"careSymbols": [
{
"category": "Wash",
"rule": "Cold flush 30°C",
"caution": "safe"
},
{
"category": "Bleach",
"rule": "No chlorine bleach",
"caution": "avoid"
},
{
"category": "Dry",
"rule": "Air dry out of sun",
"caution": "caution"
},
{
"category": "Iron",
"rule": "Wait until spot gone",
"caution": "caution"
}
],
"pileItems": [],
"spotTestReminder": "Blot-test dish soap or oxygen cleaner on the inside hem for 2 minutes before treating the front."
},
"aiGenerated": true,
"charge": {
"amountEur": 0.05,
"currency": "EUR"
}
}Every response has an X-Request-Id header. Quote it when you contact support. Rate limit: 60 calls per minute per key, reported in X-RateLimit-Limit and X-RateLimit-Remaining.
Errors
Errors use one shape: {"error": {"code", "message", "requestId"}}.
| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_JSON, INPUT_TOO_SHORT, INPUT_TOO_LONG, INVALID_IMAGE, INVALID_MODE | Fix the request. Not charged. |
| 401 | INVALID_API_KEY | Missing, malformed, revoked, or a key from another app. |
| 402 | PAYMENT_REQUIRED, KEY_SPEND_CAP_REACHED | Add funds or raise the key's cap. Not charged. |
| 413 | PAYLOAD_TOO_LARGE | Body over 6 MB. |
| 429 | RATE_LIMITED, TOO_MANY_PARALLEL_RUNS | Wait for the Retry-After seconds. |
| 502 | BILLING_UNAVAILABLE | The charge failed, so no result was returned. Not charged. |
| 503 | AI_UNAVAILABLE, WALLET_UNAVAILABLE | Temporary. Retry with backoff. Not charged. |
OpenAPI
Machine-readable description: https://stainrescue.sensifai.com/api/v1/openapi
Privacy
Inputs and results are not stored. Responses never include the key owner’s identity. If your input contains personal data, you are responsible for having a legal basis to send it.