POST
/
api
/
external
/
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.

user
string
required

The user you want to know to which variant belongs.

feature_flags
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

variants
object[]

All the variants the user belongs to.