The API is currently subject to the same limits as user accounts, you can purchase more credits at https://glif.app/pricing. see FAQ details. This is all subject to change without notice.
If you're building with our API, please join our Discord or get in touch since we'd love to chat and learn more about what you're building. For selected apps we can extend a higher rate limit during this free testing period.
We ask that you include βpowered by glif.appβ and a link to glif.app within the UI of your integration. Please use a Glif logo badge in the zip file below.
You're most likely interested in the output field, which is the final output of the workflow.
outputFull is a JSON object with more info about the final output, including it's type.
If thereβs an error itβll be in an error field, but the response will have a "200 OK" status code. For legacy reasons the the Simple API always returns 200 OK. This might change in the future.
price tells you how many credits a run took.
nodes is the output of each individual block inside the workflow (e.g. including inputs, Combiners, WebFetchers, etc)
Parameters
id
You can put the workflow id in the url:
Or put it in the body:
inputs
for now only string values are allowed
You can either use a positional array:
Or name your parameters. The names have to correspond to your block names.
visibility
You can set the visibility of the workflow to PUBLIC or PRIVATE. This is optional, and defaults to PRIVATE.
So, an example request with the parameter looks like:
Looking up the internal names of a workflow's inputs
To specify named parameters, you need to use the internal block name. This has no spaces and usually is something like "text1", "multipick2", but each workflow creator can customize it.
On the glif.app website you can look at the block names in the "View source" page of a workflow, like this one:
little diagram on the "View Source" page which shows the names of each block
Or you can look at the nodes field of a workflow's data via our API:
[
{
"id": "clkbasluf0000mi08h541a3j4",
"name": "chat.welcome",
"imageUrl": null,
"description": "",
"createdAt": "2023-07-20T15:19:11.511Z",
"updatedAt": "2023-12-01T11:59:23.279Z",
"output": "Welcome to our Discord Chat, @jamiedubs, where creativity's at!\nWith Tanaki as your guide, prepare for a delightful ride.\nWe'll connect ideas across the land, with art and magic at our command.\nSo join us now, let's collaborate, and create wonders that resonate.",
"outputType": "TEXT",
"forkedFromId": null,
"featuredAt": null,
"userId": "cli4waaz20002l5082wrs99bx",
"completedSpellRunCount": 3,
"user": {
"id": "cli4waaz20002l5082wrs99bx",
"name": "tanaki",
"image": "https://cdn.discordapp.com/avatars/1111720492408262686/a355dbcf07ce472fc7bc382cf0807802.png",
"username": "tanaki"
},
"spheres": [],
"data": {
"nodes": [
{
"name": "username",
"type": "TextInputBlock",
"params": {
"label": "@username to greet",
"value": "harrystyles"
}
},
{
"name": "ego",
"type": "GlifBlock",
"params": {
"id": "clj359oq70000le08nog0a0sb",
"inputValues": []
}
},
{
"name": "radmilk",
"type": "GlifBlock",
"params": {
"id": "clpmk3e3x000xqrpfuxrjq6gl",
"inputValues": []
}
},
{
"name": "text1",
"type": "GPTBlock",
"params": {
"api": "chat",
"model": "gpt-4",
"prompt": "{ego}\nplease keep the above in mind.\n\nI need you to welcome a new user to a discord chat.\n\nAdd a joke in the style of some example jokes. Share the joke as if it were a fact and you are mitch hedberg. Make it weird and under 2 sentences. Don't mention it is a joke. Just tell the joke. Play with their name. Add linebreaks and markdown to format your message where needed.\n\nExample jokes:\n{radmilk}\n\n\nTheir username is:\n{username}\n\nNow write the welcome message in no more than 2 short sentences:\n\n",
"maxTokens": 500,
"temperature": 0.9
}
}
]
},
"_count": {
"likes": 0,
}
}
]