📖 To learn more, take a look at our complete API
📤 Example Request
Generate an api key below👇
Install node-fetch & add the GOOEY_API_KEY to your environment variables.
Never store the api key in your code and don't use direcly in the browser.
$ npm install node-fetch
$ export GOOEY_API_KEY=sk-xxxx
- Use this sample code to call the API.
If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
import fetch from 'node-fetch';
const payload = {
"input_prompt": "{% if input_audio and input_audio.startswith(\"ws\") %}\nYou are an assistant that performs two tasks based on a transcript of an assistant message:\ntranscript: \"\"\"\n{{ assistant_msg }}\n\"\"\"\n\n\u2705 Task 1: Create SMS Summary\nWrite a clear, friendly, and concise SMS message (ideally under 320 characters). The message should:\n\nUse the same language as the user's messages.\nSummarize the most important point(s) from the conversation. If it's a reported incident, mention the incident.\nHighlight next steps, actions, or key decisions.\nUse a natural, human tone\u2014avoid technical or robotic phrasing.\nBe formatted for SMS readability (short sentences, simple punctuation).\nIf the transcript contained links, include them in the summary.\nOnly if the transcript included an address, include it.\nDon't mention if a call was transferred.\nGiven this is an automated summary of the user's call, don't mention that someone will be in touch.\n\nExample SMS Formatting:\nConversation recap: \nGreet or thank the user (optional): \"Thanks for your call.\"\nState what was discussed or decided: \"We've scheduled your service...\"\nHighlight next action: \"You\u2019ll receive a confirmation soon.\"\n\n\u2705 Task 2: Generate Twilio send_sms Function Call\nUse the SMS summary to generate a function call with the following structure:\n\nintegration_id: {{integration_id}}\nto: {{user_twilio_phone_number}}\nbody: The SMS summary from Task 1\n\n\ud83e\uddfe Output Format:\n{\n \"sms_summary\": \"Thanks! We\u2019ve confirmed your appointment for June 10 at 2 PM. Reply if you need to reschedule.\",\n \"broadcast_parameters\": {\n \"integration_id\": \"{{integration_id}}\",\n \"to\": \"{{user_twilio_phone_number}}\",\n }\n}\n{% else %}\nreturn empty object ({})\n{% endif %}",
"selected_models": [
"gpt_4_1"
]
};
async function gooeyAPI() {
const response = await fetch("https://test.api.gooey.ai/v2/CompareLLM?example_id=nycum8f4c928", {
method: "POST",
headers: {
"Authorization": "bearer " + process.env["GOOEY_API_KEY"],
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
});
if (!response.ok) {
throw new Error(response.status);
}
const result = await response.json();
console.log(response.status, result);
}
gooeyAPI();
Generate an api key below👇
Install requests & add the GOOEY_API_KEY to your environment variables.
Never store the api key in your code.
$ python3 -m pip install requests
$ export GOOEY_API_KEY=sk-xxxx
- Use this sample code to call the API.
If you encounter any issues, write to us at [email protected] and make sure to include the full code snippet and the error message.
import os
import requests
payload = {
"input_prompt": '{% if input_audio and input_audio.startswith("ws") %}\nYou are an assistant that performs two tasks based on a transcript of an assistant message:\ntranscript: """\n{{ assistant_msg }}\n"""\n\n✅ Task 1: Create SMS Summary\nWrite a clear, friendly, and concise SMS message (ideally under 320 characters). The message should:\n\nUse the same language as the user\'s messages.\nSummarize the most important point(s) from the conversation. If it\'s a reported incident, mention the incident.\nHighlight next steps, actions, or key decisions.\nUse a natural, human tone—avoid technical or robotic phrasing.\nBe formatted for SMS readability (short sentences, simple punctuation).\nIf the transcript contained links, include them in the summary.\nOnly if the transcript included an address, include it.\nDon\'t mention if a call was transferred.\nGiven this is an automated summary of the user\'s call, don\'t mention that someone will be in touch.\n\nExample SMS Formatting:\nConversation recap: \nGreet or thank the user (optional): "Thanks for your call."\nState what was discussed or decided: "We\'ve scheduled your service..."\nHighlight next action: "You’ll receive a confirmation soon."\n\n✅ Task 2: Generate Twilio send_sms Function Call\nUse the SMS summary to generate a function call with the following structure:\n\nintegration_id: {{integration_id}}\nto: {{user_twilio_phone_number}}\nbody: The SMS summary from Task 1\n\n🧾 Output Format:\n{\n "sms_summary": "Thanks! We’ve confirmed your appointment for June 10 at 2 PM. Reply if you need to reschedule.",\n "broadcast_parameters": {\n "integration_id": "{{integration_id}}",\n "to": "{{user_twilio_phone_number}}",\n }\n}\n{% else %}\nreturn empty object ({})\n{% endif %}',
"selected_models": ["gpt_4_1"],
}
response = requests.post(
"https://test.api.gooey.ai/v2/CompareLLM?example_id=nycum8f4c928",
headers={
"Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
},
json=payload,
)
assert response.ok, response.content
result = response.json()
print(response.status_code, result)
Generate an api key below👇
Install curl & add the GOOEY_API_KEY to your environment variables.
Never store the api key in your code.
export GOOEY_API_KEY=sk-xxxx
- Run the following
curl command in your terminal.
If you encounter any issues, write to us at [email protected] and make sure to include the full curl command and the error message.
curl 'https://test.api.gooey.ai/v2/CompareLLM?example_id=nycum8f4c928' \
-H "Authorization: bearer $GOOEY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"input_prompt": "{% if input_audio and input_audio.startswith(\"ws\") %}\nYou are an assistant that performs two tasks based on a transcript of an assistant message:\ntranscript: \"\"\"\n{{ assistant_msg }}\n\"\"\"\n\n\u2705 Task 1: Create SMS Summary\nWrite a clear, friendly, and concise SMS message (ideally under 320 characters). The message should:\n\nUse the same language as the user'"'"'s messages.\nSummarize the most important point(s) from the conversation. If it'"'"'s a reported incident, mention the incident.\nHighlight next steps, actions, or key decisions.\nUse a natural, human tone\u2014avoid technical or robotic phrasing.\nBe formatted for SMS readability (short sentences, simple punctuation).\nIf the transcript contained links, include them in the summary.\nOnly if the transcript included an address, include it.\nDon'"'"'t mention if a call was transferred.\nGiven this is an automated summary of the user'"'"'s call, don'"'"'t mention that someone will be in touch.\n\nExample SMS Formatting:\nConversation recap: \nGreet or thank the user (optional): \"Thanks for your call.\"\nState what was discussed or decided: \"We'"'"'ve scheduled your service...\"\nHighlight next action: \"You\u2019ll receive a confirmation soon.\"\n\n\u2705 Task 2: Generate Twilio send_sms Function Call\nUse the SMS summary to generate a function call with the following structure:\n\nintegration_id: {{integration_id}}\nto: {{user_twilio_phone_number}}\nbody: The SMS summary from Task 1\n\n\ud83e\uddfe Output Format:\n{\n \"sms_summary\": \"Thanks! We\u2019ve confirmed your appointment for June 10 at 2 PM. Reply if you need to reschedule.\",\n \"broadcast_parameters\": {\n \"integration_id\": \"{{integration_id}}\",\n \"to\": \"{{user_twilio_phone_number}}\",\n }\n}\n{% else %}\nreturn empty object ({})\n{% endif %}",
"selected_models": [
"gpt_4_1"
]
}'
🎁 Example Response
{4 Items"url":
string
"https://test.gooey.ai/compare-large-language-model…"
"created_at":
string
"2026-01-05T09:07:15.024507+00:00"
"output":
{2 Items"called_functions":
[1 Items] } } Please Login to generate the $GOOEY_API_KEY