Serverless
Make your first serverless inference call in under two minutes using the OpenAI SDK.
Make your first serverless API call in under two minutes. Serverless gives you on-demand access to popular open-source models with no setup—just call the API and pay per token.
1. Get an API key
Click Create API Key.
Copy the key—it's shown only once.
Store it in your environment:
export PARASAIL_API_KEY="your-api-key-here"2. Install the OpenAI SDK
pip install openai3. Make your first request
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.parasail.io/v1",
api_key=os.environ["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)4. List available models
Next steps
Serverless overview—full serverless API guide
Parameters reference—temperature, top_p, top_k, and more
Responses API—for multi-turn agentic workflows
Chat completions guide—understanding messages, roles, and chat templates
Use third-party tools—Cline, AnythingLLM, and other OpenAI-compatible tools
Last updated