Skip to content

Getting started with PeakPrivacy

To get started with the chat and test the LLM models: http://chat.peakprivacy.ch/

PeakPrivacy provides a simple interface for developers to create an AI layer in their own applications. The Chat Completions endpoint provides an easy way to take text as input and use a model such as Mistral, Swiss Mistral or GPT-4 to generate an output.

This quickstart is designed to help you set up your local development environment and send your first API request. If you are an experienced developer or just want to start using it, the API reference and LLM guide are a good place to start.

Here you will learn

  • How to set up your development environment
  • How to install the latest SDKs
  • Some of the basic concepts of the OpenAI API
  • How to send your first API request

TIP

If you run into challenges or have questions about getting started, write to us in the chat

Account setup

First create an account or log in. Then navigate to the API key page and create a new API token. Make sure you save it in a safe place and do not share it with anyone.

Curl

Curl is a popular command line tool used by developers to send HTTP requests to APIs. It requires minimal setup time, but is less powerful than a full-featured programming language like Python or JavaScript.

Many operating systems ship curl by default. You can check if you have curl installed by opening your terminal or command line and then typing the command:

sh
curl https://api.peakprivacy.ch/v1/ai/completions

If curl is set up and you are connected to the Internet, it will send an HTTP request to retrieve the contents of PeakPrivacy.

If you receive an error message that curl is not found, you can install it by following the instructions on the CURL homepage.

Once you have set up an API key, the final step is to send your first API request. For this purpose, sample requests to the Chat Completions API are listed below.

sh
curl --location --request POST 'https://api.peakprivacy.ch/v1/ai/completions' \
--header 'Api-token: ' \
--header 'X-Requested-With: XMLHttpRequest' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
	"model": "gpt-4",
    "messages": [
        {
            "role": "user",
            "content": "List the advantages of working with an AI partner that focuses on privacy and operates the LLM models primarily in Switzerland"
        }
    ],
    "anonymize": true
}'

Next steps

Now that you've made your first Peak Privacy request, it's time to explore all the models and other options.