Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions fern/advanced/concurrency-limits.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Managing Concurrency Limits
subtitle: Tips for managing concurrency limits
slug: advanced/concurrency-limits
---

# API Retry and Concurrency Management

## Handling Retries
Retries are effective for API calls of short durations. For longer-running calls, such as those exceeding 10 minutes, ensure your retry intervals align with the call duration to prevent premature attempts or wasted resources.

## Concurrency Limits
The API enforces a concurrency limit, which governs the number of simultaneous API calls. When this limit is exceeded, the API responds with:
```http
HTTP/1.1 400 Bad Request
{
"error": "Over Concurrency Limit"
}
```
## Avoiding Concurrency Limit Breaches

High volumes of outbound calls, especially when queued via the dashboard, can lead to hitting the concurrency cap. Follow these best practices to avoid such breaches:

- **Reduce simultaneous calls:** Minimize concurrent requests to keep within the limit.
- **Introduce delays:** Space out call initiations to manage traffic.
- **Optimize call durations:** Ensure calls complete efficiently to prevent queue overloads.

## Managing Concurrency Effectively

For enterprise plans, additional concurrency capacity can be purchased. Use the monitoring tools provided in the API dashboard to:

- **Track active call usage:** Monitor ongoing API requests to stay within limits.
- **Analyze and adjust thresholds:** Identify patterns and reconfigure settings as needed.
- **Reference your subscription schema for limit details:**
- `Subscription.concurrencyLimitIncluded`: Default concurrency capacity.
- `Subscription.concurrencyLimitPurchased`: Additional purchased capacity.

For more details, refer to the [Subscription schema](https://api.vapi.ai/api/).
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ navigation:
path: voice-fallback-plan.mdx
- page: OpenAI Realtime
path: openai-realtime.mdx
- page: Managing Concurrency Limits
path: advanced/concurrency-limits.mdx
- section: Glossary
contents:
- page: Definitions
Expand Down
Loading