Create a prediction
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/predictions/models/{modelKey} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form _file='@example-file'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/predictions/models/{modelKey}"
files = { "_file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"predictionKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"predictionCreationProgressUrl": "<string>"
}Predictions
Create a prediction
Creates a new prediction using the specified model and blind CSV file
POST
/
api
/
v1
/
predictions
/
models
/
{modelKey}
Create a prediction
curl --request POST \
--url https://{tenant}-api.mathfi.ai/api/v1/predictions/models/{modelKey} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form _file='@example-file'import requests
url = "https://{tenant}-api.mathfi.ai/api/v1/predictions/models/{modelKey}"
files = { "_file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"predictionKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"predictionCreationProgressUrl": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
multipart/form-data
The CSV, sent as a multipart part named exactly _file. The underscore is not a typo: it is the name every caller sends and the only name the server binds.
Response
Prediction created successfully
Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[4][0-9a-fA-F]{3}-[89aAbB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$Status of prediction processing:
PENDING- The prediction has been successfully created and is pending executionRUNNING- The prediction is currently being processed. When this status is returned, an url for progress check is returned tooCOMPLETED- The prediction has been successfully completed. An url to download the result as CSV is provided in the responseFAILED- The prediction execution has failedTIMEOUT- The prediction execution has timed out
Available options:
PENDING, RUNNING, COMPLETED, FAILED, TIMEOUT