# 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="/files/RbTWDN7qmuLiMepWZVyA" 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="/files/dQBFwKQnirn2taqgX51j" alt="" width="136"><figcaption></figcaption></figure>

#### Getting an API Key:

Which will allow you to generate an API Key:

<figure><img src="/files/OdXlCwIEhwCXWufI4ZDe" 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="/files/awzPVoqrdTVfVKaGIavc" 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="/files/xSqAyL4yjTPasqa9Zk9U" alt=""><figcaption></figcaption></figure>

Then you could get:

<figure><img src="/files/5I8ldnM673XA86dE6VwE" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parasail.io/parasail-docs/serverless-and-models/serverless.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
