FastAPI (0.1.0)
Download OpenAPI specification:Download
Predict
Use the latest model for the given project to predict on a batch of datapoints and return the result
Authorizations:
path Parameters
project_id required | integer (Project Id) |
Request Body schema: application/json
batch_id required | string (User-provided batch ID) |
required | Array of objects (An array of data containing the input fields defined by your project and any additional key-value meta-data you wish to record for a prediction such as your document ids.) [ items ] |
Responses
Request samples
- Payload
Content type
application/json
{- "batch_id": "string",
- "data": [
- {
- "text": "Your document data...",
- "external_id": "123"
}
]
}
Response samples
- 200
- 422
Content type
application/json
{- "project_id": 0,
- "predictions": [
- {
- "learner_id": "string",
- "batch_id": "string",
- "input": { },
- "output": [
- {
- "output": "span_tags",
- "task_type": "classification",
- "value": [
- {
- "start": 0,
- "end": 0,
- "label": "string",
- "text": "The extracted span text ...",
- "confidence": 0,
- "id": "string",
- "parent_id": 0,
- "object": "span"
}
], - "explanation": "string",
- "id": "string",
- "object": "output_value"
}
]
}
]
}
Score
Use the latest model for the given project to score on a batch of datapoints and return the result
Authorizations:
path Parameters
project_id required | integer (Project Id) |
Request Body schema: application/json
batch_id required | string (User-provided batch ID) |
required | Array of objects (An array of data containing the input fields defined by your project and any additional key-value meta-data you wish to record for a prediction such as your document ids.) [ items ] |
Responses
Request samples
- Payload
Content type
application/json
{- "batch_id": "string",
- "data": [
- {
- "text": "Your document data...",
- "external_id": "123"
}
]
}
Response samples
- 200
- 422
Content type
application/json
{- "project_id": 0,
- "scores": [
- {
- "learner_id": "string",
- "batch_id": "string",
- "input": { },
- "score": 0
}
]
}