POST
/v1/models/{model_id}/inferRun inference
Runs the matching pipeline for the model's stored modality and task. Image models require a file; text models accept JSON, form text, or a UTF-8 text file.
Request
curl https://api.flashml.dev/v1/models/6f2c8d9a-2e8d-4ed3-b9f2-9f3d2d2d7e8f/infer \
-H "Authorization: Bearer $FLASHML_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"The checkout flow was fast and reliable."}'Response
{
"model": "model.onnx",
"version": "1",
"predictions": [
{ "label": "positive", "confidence": 0.9821 },
{ "label": "negative", "confidence": 0.0179 }
],
"top_result": {
"label": "positive",
"confidence": 0.9821
}
}