curl --location --request POST 'https://api.gists.ai/v1/generate/<gist_id>/<variant_slug>' \
--header 'Content-Type: application/json' \
--header 'GISTS-API-KEY: <api_key>' \
--data-raw '{
    "values": {
        "variable_1": "value 1",
        "variable_2": "value 2",
    }
}'
{
  "error": null,
  "data": {
    "id": "cHJvbXB0OjEwMjQ2Nw==",
    "content": "As a large language model, ...",
  }
}

Path parameters

gistId
string
required

Id of the gist to use

variantSlug
string

(optional) Slug of the variant to use. If not specified, we’ll choose a variant based on variant traffic allocation.

Body

values
object

A dictionary of variable names and values for the variables in the gist.

Response

error
string

Indicates whether the call failed with error

data
object
curl --location --request POST 'https://api.gists.ai/v1/generate/<gist_id>/<variant_slug>' \
--header 'Content-Type: application/json' \
--header 'GISTS-API-KEY: <api_key>' \
--data-raw '{
    "values": {
        "variable_1": "value 1",
        "variable_2": "value 2",
    }
}'
{
  "error": null,
  "data": {
    "id": "cHJvbXB0OjEwMjQ2Nw==",
    "content": "As a large language model, ...",
  }
}