• Gooey.AI
  • API: EU DSA Bot


    📖 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": "what's a dark pattern, according to these docs?",
      "messages": [
        {
          "role": "user",
          "content": "What's the DSA about?"
        },
        {
          "role": "assistant",
          "content": "The Digital Services Act (DSA) is a regulation aimed at protecting the digital space from the spread of illegal content and safeguarding users' fundamental rights. It sets out obligations for online platforms and services, particularly focusing on large entities known as very large online platforms (VLOPs) and very large online search engines (VLOSEs), which are subject to stricter rules. The DSA requires platforms to be more transparent, holds them accountable for disseminating illegal and harmful content, combats the sale of illegal products online, and introduces measures against illegal content. It also protects minors from targeted advertising based on their personal data, imposes limits on advertising, bans dark patterns, and requires VLOPs and VLOSEs to offer non-profiling-based content recommendation systems and analyze systemic risks they may create."
        },
        {
          "role": "user",
          "content": "What roles does the auditor play?"
        },
        {
          "role": "assistant",
          "content": "The auditor plays a crucial role in the supervision of compliance for very large online platforms and search engines with their obligations under the DSA. Independent audits are an important tool in assessing providers' adherence to the DSA, and their findings can meaningfully inform regulatory supervision. Auditors are responsible for carrying out audits in an effective, efficient, timely, and comparable manner. They assess the compliance of these providers with the DSA and any commitments they have made under codes of conduct and crisis protocols. The auditors provide an independent assessment that enhances accountability by offering both the public and regulators insight into the providers' compliance with their obligations."
        }
      ]
    };
    
    async function gooeyAPI() {
      const response = await fetch("https://api.gooey.ai/v2/video-bots?example_id=033ewget", {
        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": "what's a dark pattern, according to these docs?",
        "messages": [
            {"role": "user", "content": "What's the DSA about?"},
            {
                "role": "assistant",
                "content": "The Digital Services Act (DSA) is a regulation aimed at protecting the digital space from the spread of illegal content and safeguarding users' fundamental rights. It sets out obligations for online platforms and services, particularly focusing on large entities known as very large online platforms (VLOPs) and very large online search engines (VLOSEs), which are subject to stricter rules. The DSA requires platforms to be more transparent, holds them accountable for disseminating illegal and harmful content, combats the sale of illegal products online, and introduces measures against illegal content. It also protects minors from targeted advertising based on their personal data, imposes limits on advertising, bans dark patterns, and requires VLOPs and VLOSEs to offer non-profiling-based content recommendation systems and analyze systemic risks they may create.",
            },
            {"role": "user", "content": "What roles does the auditor play?"},
            {
                "role": "assistant",
                "content": "The auditor plays a crucial role in the supervision of compliance for very large online platforms and search engines with their obligations under the DSA. Independent audits are an important tool in assessing providers' adherence to the DSA, and their findings can meaningfully inform regulatory supervision. Auditors are responsible for carrying out audits in an effective, efficient, timely, and comparable manner. They assess the compliance of these providers with the DSA and any commitments they have made under codes of conduct and crisis protocols. The auditors provide an independent assessment that enhances accountability by offering both the public and regulators insight into the providers' compliance with their obligations.",
            },
        ],
    }
    
    response = requests.post(
        "https://api.gooey.ai/v2/video-bots?example_id=033ewget",
        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/video-bots?example_id=033ewget' \
      -H "Authorization: bearer $GOOEY_API_KEY" \
      -H 'Content-Type: application/json' \
      -d '{
      "input_prompt": "what'"'"'s a dark pattern, according to these docs?",
      "messages": [
        {
          "role": "user",
          "content": "What'"'"'s the DSA about?"
        },
        {
          "role": "assistant",
          "content": "The Digital Services Act (DSA) is a regulation aimed at protecting the digital space from the spread of illegal content and safeguarding users'"'"' fundamental rights. It sets out obligations for online platforms and services, particularly focusing on large entities known as very large online platforms (VLOPs) and very large online search engines (VLOSEs), which are subject to stricter rules. The DSA requires platforms to be more transparent, holds them accountable for disseminating illegal and harmful content, combats the sale of illegal products online, and introduces measures against illegal content. It also protects minors from targeted advertising based on their personal data, imposes limits on advertising, bans dark patterns, and requires VLOPs and VLOSEs to offer non-profiling-based content recommendation systems and analyze systemic risks they may create."
        },
        {
          "role": "user",
          "content": "What roles does the auditor play?"
        },
        {
          "role": "assistant",
          "content": "The auditor plays a crucial role in the supervision of compliance for very large online platforms and search engines with their obligations under the DSA. Independent audits are an important tool in assessing providers'"'"' adherence to the DSA, and their findings can meaningfully inform regulatory supervision. Auditors are responsible for carrying out audits in an effective, efficient, timely, and comparable manner. They assess the compliance of these providers with the DSA and any commitments they have made under codes of conduct and crisis protocols. The auditors provide an independent assessment that enhances accountability by offering both the public and regulators insight into the providers'"'"' compliance with their obligations."
        }
      ]
    }'
    

    🎁 Example Response

    {4 Items
    "id"
    :
    string
    "07horq2902hp"
    "url"
    :
    string
    "https://gooey.ai/copilot/"
    "created_at"
    :
    string
    "2023-11-17T16:57:02.603528+00:00"
    "output"
    :
    {13 Items
    "final_prompt"
    :
    string
    "<|im_start|>system You are DSA bot, a witty, intel"
    "output_text"
    :
    [1 Items
    0
    :
    string
    "According to the provided search result snippet, a"
    ]
    "output_audio"
    :
    [
    ]0 Items
    "output_video"
    :
    [
    ]0 Items
    "raw_input_text"
    :
    string
    "what's a dark pattern, according to these docs?"
    "raw_tts_text"
    :
    NULL
    "raw_output_text"
    :
    [1 Items
    0
    :
    string
    "According to the provided search result snippet, a"
    ]
    "references"
    :
    [1 Items
    0
    :
    {
    }4 Items
    ]
    "final_search_query"
    :
    string
    "You're asking about the definition of a dark patte"
    "final_keyword_query"
    :
    NULL
    "output_documents"
    :
    NULL
    "reply_buttons"
    :
    NULL
    "finish_reason"
    :
    NULL
    }
    }

    Please Login to generate the $GOOEY_API_KEY