# Serverless

## API Usage:

#### UI API:

All of our serverless models are accessible using our OpenAPI spec API. On the Serverless page you can find example code to get the endpoints. If you click on a serverless model:

Our API Gateway is: <https://api.parasail.io/v1>

<figure><img src="https://3807676826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLSXNQZeD4w30hUaiugTx%2Fuploads%2Fgit-blob-ac751a53872f5986258bafa285918afa05e4fee5%2Fimage%20(26).png?alt=media" alt=""><figcaption></figcaption></figure>

You will get example code like this:

```python
# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://api.parasail.io/v1",
    api_key="<PARASAIL_API_KEY>"
)

chat_completion = client.chat.completions.create(
    model="parasail-deepseek-r1",
    messages=[{"role": "user", "content": "What is the capital of New York?"}]
)

print(chat_completion.choices[0].message.content)
```

You will need to get an API Key from your profile:

<figure><img src="https://3807676826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLSXNQZeD4w30hUaiugTx%2Fuploads%2Fgit-blob-83380909f087098188dda0b711c7db08ef61bf26%2Fimage.png?alt=media" alt="" width="136"><figcaption></figcaption></figure>

#### Getting an API Key:

Which will allow you to generate an API Key:

<figure><img src="https://3807676826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLSXNQZeD4w30hUaiugTx%2Fuploads%2Fgit-blob-e0bf0cab46bb45f003f74015a5ea9b56fe804cd3%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

**The API Key is displayed one time at creation and is not able to be seen again.**

#### Programmatically Find Models:

You can find the model list by using our /models endpoint. You can find it by:

```
curl https://api.parasail.io/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"
```

The API key can be found through the UI like above.

## Using Third-Party Tools Like Cline, AnythingLLM:

Our serverless OpenAI spec allows you to use third-party tools seamlessly just like other popular providers.

Taking the example of Cline, a popular coding tool within Visual Studio:

Find the model you want to use with cline like QwenCoder 32b or DeepSeekR1:

<figure><img src="https://3807676826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLSXNQZeD4w30hUaiugTx%2Fuploads%2Fgit-blob-28912f20b3686090f7e39480d51c3898ca392f9d%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Find the model name, and have your [API Key Ready](#getting-an-api-key),

Then head over to your favorite tool like Cline:

<figure><img src="https://3807676826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLSXNQZeD4w30hUaiugTx%2Fuploads%2Fgit-blob-be45d62a2b623d6f7964114b2b25396b8bfcbec5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

Then you could get:

<figure><img src="https://3807676826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLSXNQZeD4w30hUaiugTx%2Fuploads%2Fgit-blob-5fa80ff7ffb74ed15a2a169988d578ababf94863%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
