curl --request POST \
--url https://api.bespokelabs.ai/v1/systemone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nimble-latest",
"state": "The customer was charged twice and asks for a refund. The service still works.",
"questions": {
"refund": {
"type": "noul",
"instructions": "Does the customer request a refund?"
},
"department": {
"type": "choice",
"instructions": "Which department should handle this request?",
"criteria": {
"billing": "Charges, payments and refunds",
"technical": "Software bugs and outages"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"Routine billing request; service works",
"Some functionality unavailable",
"Complete service outage"
]
}
}
}
'{
"model": "nimble-latest",
"answers": {
"refund": {
"type": "noul",
"noul": 0.998
},
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 1,
"technical": 0
},
"confidence": 1
},
"urgency": {
"type": "score",
"score": 0,
"legend": {
"0": "Routine billing request; service works",
"1": "Some functionality unavailable",
"2": "Complete service outage"
},
"probabilities": {
"0": 1,
"1": 0,
"2": 0
},
"confidence": 1
}
},
"usage": {
"input_tokens": 338,
"output_tokens": 4
}
}Nimble API
System One
Send a state and questions about it to any Nimble model. The model field picks the model. Fact check models take the document as a string state and one noul question for each claim. The path /v1/nimble/systemone takes the same requests.
POST
/
v1
/
systemone
curl --request POST \
--url https://api.bespokelabs.ai/v1/systemone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "nimble-latest",
"state": "The customer was charged twice and asks for a refund. The service still works.",
"questions": {
"refund": {
"type": "noul",
"instructions": "Does the customer request a refund?"
},
"department": {
"type": "choice",
"instructions": "Which department should handle this request?",
"criteria": {
"billing": "Charges, payments and refunds",
"technical": "Software bugs and outages"
}
},
"urgency": {
"type": "score",
"instructions": "How urgent is this request?",
"criteria": [
"Routine billing request; service works",
"Some functionality unavailable",
"Complete service outage"
]
}
}
}
'{
"model": "nimble-latest",
"answers": {
"refund": {
"type": "noul",
"noul": 0.998
},
"department": {
"type": "choice",
"choice": "billing",
"probabilities": {
"billing": 1,
"technical": 0
},
"confidence": 1
},
"urgency": {
"type": "score",
"score": 0,
"legend": {
"0": "Routine billing request; service works",
"1": "Some functionality unavailable",
"2": "Complete service outage"
},
"probabilities": {
"0": 1,
"1": 0,
"2": 0
},
"confidence": 1
}
},
"usage": {
"input_tokens": 338,
"output_tokens": 4
}
}Authorizations
Your Bespoke Labs API key.
Body
application/json
- General models
- Fact check
The model field picks the model, and the model decides what the state and the questions must look like.
The text or JSON to ask about. Nimble reads a JSON state as JSON text.
Your question IDs mapped to questions. The answers use the same IDs.
Show child attributes
Show child attributes
nimble-latest is the newest general model, which is nimble-v3 now. nimble-v3 stays on this model. The response repeats this name.
Available options:
nimble-latest, nimble-v3