Skip to main content
POST
AB Testing: Get Variants
This endpoint provides the necessary information for A/B testing. Given a user and a list of experiments or feature flags, the endpoint returns the variants assigned to the user. Since multiple feature flags can target the same user population, a user may belong to multiple variants. A variant is an object that includes all the fields required to identify and use the specific version of the LLM assigned to the user. It contains a flag ID, which allows you to map the variant back to its corresponding feature flag.
string
required
The user you want to know to which variant belongs.
string[]
required
The feature flags related to the experiment you are currently running. Note that you can run multiple experiments at the same time and you can run multiple feature flags on the same model.

Response

object[]
All the variants the user belongs to.