Request Body
Parameter
Type
Description
text required
string
The solicitation description text
psc optional
string
Product Service Code (e.g., "59", "23")
naics optional
string
NAICS industry code (e.g., "334419")
set_aside optional
string
Set-aside type (e.g., "Small Business")
amount optional
number
Estimated contract value in USD
Example Request
curl -X POST https://anvil-api-production.up.railway.app/predict \
-H "Content-Type: application/json" \
-d '{
"text": "Procurement for military vehicle replacement parts",
"psc": "23",
"naics": "336992",
"amount": 150000
}'
Response
{
"predictions" : [
{
"rank" : 1 ,
"vendor" : "OSHKOSH DEFENSE LLC" ,
"confidence" : 15.42
},
{
"rank" : 2 ,
"vendor" : "BAE SYSTEMS" ,
"confidence" : 8.31
},
],
"total_vendors" : 500 ,
"inference_time_ms" : 28.4 ,
"token_count" : 12 ,
"top_terms" : [
{ "term" : "vehicle" , "weight" : 0.412 },
{ "term" : "military" , "weight" : 0.385 },
],
"confidence_distribution" : [15.42 , 8.31 , ]
}
Response Fields
Field
Type
Description
predictions
array
Top 10 predicted vendors with rank and confidence %
total_vendors
number
Total vendors in the model (500)
inference_time_ms
number
Model inference time in milliseconds
token_count
number
Number of TF-IDF tokens extracted from input
top_terms
array
Top 15 influential terms with TF-IDF weights
confidence_distribution
array
Confidence scores for top 50 vendors (for charting)
Status Codes
200
Successful prediction
400
Missing or empty text field
Try it
Click "Try it" to see response