> For the complete documentation index, see [llms.txt](https://docs.parasail.io/parasail-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parasail.io/parasail-docs/quickstart/elastic-endpoints.md).

# Elastic Endpoints

Create your first Elastic Endpoint in the Parasail dashboard and call it with the OpenAI SDK.

Create an Elastic Endpoint for a supported model and send your first request in a few minutes. Elastic Endpoints give your requests priority when capacity is constrained. You pay per token, with no GPU-hour commitment.

{% hint style="info" %}
You must be an **Owner** of your organization to create API keys and to create, pause, start, or delete an Elastic Endpoint. Any API key in your organization can call the endpoint.
{% endhint %}

## 1. Get an API key

1. Go to <https://platform.parasail.io/api-keys>.
2. Click **Create key**, name the key, and choose an access level. **Inference-only** is enough to call an endpoint.
3. Copy the key. The full key is shown only once.

Store it in your environment:

```bash
export PARASAIL_API_KEY="your-api-key-here"
```

## 2. Open Elastic Endpoints

Go to <https://platform.parasail.io/elastic-endpoints>, or click **Elastic Endpoints** in the dashboard sidebar. Click **Create**. If your organization already has endpoints, click **Create endpoint**.

The create flow has four steps—**Model**, **Pricing**, **Name**, and **Review**.

## 3. Select a model

The **Model** step lists the models available for Elastic Endpoints with their input, output, and cached input rates per 1M tokens. Search by model name or provider, then select a row and click **Continue**.

* Your organization can have one endpoint per model. A model that already has an endpoint shows **Already created**.
* Need a model that isn't in the list? Enter it under **Looking for another model?** and click **Request this model**. The Parasail team follows up with you.

## 4. Review pricing

The **Pricing** step shows the model's rates per 1M tokens for input, output, and cached input. Enter your expected tokens per month to see an estimated monthly cost. To change the input-to-output ratio or the cache hit rate that the estimate uses, click the **Assumes…** note under the estimate.

You pay only for tokens processed while the endpoint is running and serving requests. For purchase orders or invoicing, use the **Need a PO or custom billing?** link under the estimate.

## 5. Name your endpoint

The **Name** step suggests a name. Keep it, edit it, or click **Regenerate name**. A name must:

* Be 2–32 characters long.
* Use only lowercase letters, digits, and hyphens.
* Start with a letter and end with a letter or digit.
* Be unique. The step checks this as you type.

You can't change the name after you create the endpoint. The name becomes part of the endpoint's **Model ID**, which you send in the `model` parameter of each request.

## 6. Review and deploy

The **Review** step shows the model, its rates, your estimated monthly cost, and the endpoint name. Click **Deploy endpoint**.

The endpoint's page opens. When the status shows **Running**, the endpoint is ready to serve requests.

## 7. Call your endpoint

Open **Connect to this endpoint** on the endpoint's page. It shows the base URL, the **Model ID**, and ready-to-copy examples in Python, JavaScript, and cURL. Use the Model ID as the `model` parameter:

```python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.parasail.io/v1",
    api_key=os.environ["PARASAIL_API_KEY"],
)

response = client.chat.completions.create(
    model="your-model-id",  # The Model ID from your endpoint's page
    messages=[{"role": "user", "content": "Hello!"}],
)

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

If the endpoint returns HTTP 429, retry with exponential backoff. See [Retries and Idempotency](https://docs.parasail.io/parasail-docs/operate-in-production/retries-and-idempotency.md).

## 8. Monitor and manage your endpoint

The **Metrics** section of the endpoint's page shows requests, time to first token, output tokens per second, and end-to-end latency for the last hour, 6 hours, or 24 hours.

Use the **Manage** menu on the endpoint's page to change the endpoint:

| Action     | Result                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------------------ |
| **Pause**  | The endpoint stops serving requests, and charges pause. The status shows **Paused**.                         |
| **Start**  | The endpoint serves requests again, and billing resumes for usage.                                           |
| **Delete** | Type the endpoint name to confirm. The Model ID stops working within a few seconds. You can't undo a delete. |

## Next steps

* [Elastic Endpoints overview](https://docs.parasail.io/parasail-docs/products/capacity.md)—how Elastic Endpoints work and when to use them
* [Parameters reference](https://docs.parasail.io/parasail-docs/api-reference/parameters.md)—temperature, top\_p, top\_k, and more
* [Retries and idempotency](https://docs.parasail.io/parasail-docs/operate-in-production/retries-and-idempotency.md)—handle `429` responses in production
* [Account and API keys](https://docs.parasail.io/parasail-docs/security-and-account-management/account-api-keys.md)—organization roles and API key access levels
