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, ...",
}
}
Generate
Generate
This endpoint calls the gist and the variant specified in the url parameter
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
string
required
Id of the gist to use
string
(optional) Slug of the variant to use. If not specified, we’ll choose a variant based on variant traffic allocation.
Body
object
A dictionary of variable names and values for the variables in the gist.
Response
string
Indicates whether the call failed with error
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, ...",
}
}
Authorizations
Path Parameters
Id of the gist to use
(optional) Slug of the variant to use. If not specified, we’ll choose a variant based on variant traffic allocation.
Body
application/json
A dictionary of variable names and values for the variables in the gist.
Was this page helpful?