Quickstart

This guide will get you all set up and ready to use the Peer AI API. We'll cover how to make your first API request. We'll also look at where to go next to find all the information you need to take full advantage of our API.

Choose your client

Before making your first API request, you need to pick which API client you will use. In addition to good ol' cURL HTTP requests, Peer AI also offers SDK for JavaScript. In the following example, you can see how to install each client.

# cURL is most likely already installed on your machine
curl --version

Making your first API request

After picking your preferred client, you are ready to make your first call to the Peer AI API. Below, you can see how to send a POST request to the pipeline endpoint to run a sentiment analysis model on the text "I love transformers!".

POST
/pipeline
curl -X POST https://api.peer-ai.com/v1/pipeline \
      -H "X-API-Group: main" \
      -H "X-API-Key: {YOUR_API_KEY}" \
      -H "Content-Type: application/json" \
      -d "{\"task\": \"sentiment-analysis\", \"inputs\": [\"I love transformers!\"]}"

What's next?

Great, you're now set up to make API requests to Peer AI. Here are some next steps to help you get the most out of our API:

Tasks

Read the docs on how to run compute on different tasks.

Natural Language Processing

Learn how to run AI models related to natural language processing tasks. For example, text classification, question answering, and summarization.

Vision

Learn how to run AI models related to vision tasks. For example, image classification, object detection, and image segmentation.

Stable Diffusion

Learn how to run AI models related to stable diffusion tasks. For example, image classification, object detection, and image segmentation.

Audio

Learn how to run AI models related to audio tasks. For example, speech recognition, speech synthesis, and speaker recognition.

Tabular

Learn how to run AI models related to tabular data. For example, classification and regression.

Multimodal

Learn how to run AI models related to multimodal tasks. For example, image captioning, visual question answering, and visual reasoning.

Reinforcement Learning

Learn how to run AI models related to reinforcement learning tasks. For example, Atari games, MuJoCo, and ProcGen.