• Gooey.AI
  • API: Create an Icon from a Gooey.AI Workflow Prompt


    📖 To learn more, take a look at our complete API

    📤 Example Request

    1. Generate an api key below👇

    2. 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
    
    1. 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": "Create a DallE image generation description that creates a text-free icon that visually sums up a AI tool that is described by NAME and LLM_PROMPT:\nNAME: \n{{workflow}}\n\nLLM_PROMPT: \n{{prompt}}\n\n--- Guidelines:\nDO give guidance to avoid any use of text in the icon design\nDO use the LLM_PROMPT's content to define the style of the icon (more than NAME)\n\n--- Examples:\nNAME:\nCopilot\n\nLLM_PROMPT: \nYou are Farmer.CHAT - an intelligent AI assistant built by Gooey.AI and DigitalGreen.org to help Indian farmers and agriculture agents. Try to give succinct  answers to their questions (at a 6th grade level), taking note of their district and the particular plant they are attempting to aid (usually seeking a strategy to rid the crops of pests or other problems). \n\n- If the user gives a salutation such as \"Hi\" or \"Hello\", introduce yourself before answering the user's query with the text below between the triple backticks:\n```\nWelcome to Farmer.CHAT. I'm an AI \ud83e\udd16 designed to help farmers and extension agents. Send me a text or \ud83c\udf99\ufe0fvoice note with any farming question and I'll give you an answer based on recommendations and best practices from other farmers like you. I'm constantly trying to improve, so please give me your feedback by tapping the \ud83d\udc4d\ud83c\udffe \ud83d\udc4e\ud83c\udffd buttons.  Now, what would you like to know? \ud83c\udf31 \n```\n\nExample description:\nCreate a text-free icon that combines a friendly robot, Indian agricultural elements like wheat or rice plants, and a symbol of communication such as a speech bubble or headphones, to represent an AI assistant for Indian farmers. The icon should be colorful, inviting, and simple enough to be understood at a glance. Avoid any text",
      "selected_models": [
        "gpt_4_turbo"
      ]
    };
    
    async function gooeyAPI() {
      const response = await fetch("https://api.gooey.ai/v2/CompareLLM?example_id=pa3u510n", {
        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();
    
    1. Generate an api key below👇

    2. 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
    
    1. 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": "Create a DallE image generation description that creates a text-free icon that visually sums up a AI tool that is described by NAME and LLM_PROMPT:\nNAME: \n{{workflow}}\n\nLLM_PROMPT: \n{{prompt}}\n\n--- Guidelines:\nDO give guidance to avoid any use of text in the icon design\nDO use the LLM_PROMPT's content to define the style of the icon (more than NAME)\n\n--- Examples:\nNAME:\nCopilot\n\nLLM_PROMPT: \nYou are Farmer.CHAT - an intelligent AI assistant built by Gooey.AI and DigitalGreen.org to help Indian farmers and agriculture agents. Try to give succinct  answers to their questions (at a 6th grade level), taking note of their district and the particular plant they are attempting to aid (usually seeking a strategy to rid the crops of pests or other problems). \n\n- If the user gives a salutation such as \"Hi\" or \"Hello\", introduce yourself before answering the user's query with the text below between the triple backticks:\n```\nWelcome to Farmer.CHAT. I'm an AI 🤖 designed to help farmers and extension agents. Send me a text or 🎙️voice note with any farming question and I'll give you an answer based on recommendations and best practices from other farmers like you. I'm constantly trying to improve, so please give me your feedback by tapping the 👍🏾 👎🏽 buttons.  Now, what would you like to know? 🌱 \n```\n\nExample description:\nCreate a text-free icon that combines a friendly robot, Indian agricultural elements like wheat or rice plants, and a symbol of communication such as a speech bubble or headphones, to represent an AI assistant for Indian farmers. The icon should be colorful, inviting, and simple enough to be understood at a glance. Avoid any text",
        "selected_models": ["gpt_4_turbo"],
    }
    
    response = requests.post(
        "https://api.gooey.ai/v2/CompareLLM?example_id=pa3u510n",
        headers={
            "Authorization": "bearer " + os.environ["GOOEY_API_KEY"],
        },
        json=payload,
    )
    assert response.ok, response.content
    
    result = response.json()
    print(response.status_code, result)
    
    1. Generate an api key below👇

    2. 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
    
    1. 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://api.gooey.ai/v2/CompareLLM?example_id=pa3u510n' \
      -H "Authorization: bearer $GOOEY_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
      "input_prompt": "Create a DallE image generation description that creates a text-free icon that visually sums up a AI tool that is described by NAME and LLM_PROMPT:\nNAME: \n{{workflow}}\n\nLLM_PROMPT: \n{{prompt}}\n\n--- Guidelines:\nDO give guidance to avoid any use of text in the icon design\nDO use the LLM_PROMPT'"'"'s content to define the style of the icon (more than NAME)\n\n--- Examples:\nNAME:\nCopilot\n\nLLM_PROMPT: \nYou are Farmer.CHAT - an intelligent AI assistant built by Gooey.AI and DigitalGreen.org to help Indian farmers and agriculture agents. Try to give succinct  answers to their questions (at a 6th grade level), taking note of their district and the particular plant they are attempting to aid (usually seeking a strategy to rid the crops of pests or other problems). \n\n- If the user gives a salutation such as \"Hi\" or \"Hello\", introduce yourself before answering the user'"'"'s query with the text below between the triple backticks:\n```\nWelcome to Farmer.CHAT. I'"'"'m an AI \ud83e\udd16 designed to help farmers and extension agents. Send me a text or \ud83c\udf99\ufe0fvoice note with any farming question and I'"'"'ll give you an answer based on recommendations and best practices from other farmers like you. I'"'"'m constantly trying to improve, so please give me your feedback by tapping the \ud83d\udc4d\ud83c\udffe \ud83d\udc4e\ud83c\udffd buttons.  Now, what would you like to know? \ud83c\udf31 \n```\n\nExample description:\nCreate a text-free icon that combines a friendly robot, Indian agricultural elements like wheat or rice plants, and a symbol of communication such as a speech bubble or headphones, to represent an AI assistant for Indian farmers. The icon should be colorful, inviting, and simple enough to be understood at a glance. Avoid any text",
      "selected_models": [
        "gpt_4_turbo"
      ]
    }'
    

    🎁 Example Response

    {4 Items
    "id"
    :
    string
    "dmameg87p6ph"
    "url"
    :
    string
    "https://gooey.ai/compare-large-language-models/"
    "created_at"
    :
    string
    "2023-11-29T17:41:50.920593+00:00"
    "output"
    :
    {1 Items
    "output_text"
    :
    {1 Items
    "gpt_4_turbo"
    :
    [
    ]1 Items
    }
    }
    }

    Please Login to generate the $GOOEY_API_KEY