Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 16 additions & 6 deletions api-reference/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,25 @@ will also fail.
<RequestExample>

```bash cURL with Bearer
curl 'https://api.edgee.ai/v1/projects' \
-H 'Authorization: Bearer <token>'
curl 'https://api.edgee.ai/v1/chat/completions' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-4o",
"messages": [{"role": "user", "content": "Hello"}]
}'
```

```bash cURL with Basic Auth
curl 'https://api.edgee.ai/v1/projects' \
-u '<token>:'
curl 'https://api.edgee.ai/v1/chat/completions' \
-u '<token>:' \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-4o",
"messages": [{"role": "user", "content": "Hello"}]
}'
# The colon prevents curl from asking for a password.
```

</RequestExample>

12 changes: 11 additions & 1 deletion api-reference/errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ Below is a summary of the HTTP status codes that Edgee API uses.

<ResponseField name="code" type="string">
One of the following error codes:

- `bad_model_id`: The model ID format is invalid
- `model_not_found`: The requested model does not exist or is not available
- `provider_not_supported`: The requested provider is not supported for the specified model
- `streaming_not_supported`: Streaming is only supported when using Anthropic provider for Messages API
</ResponseField>

<ResponseExample>
Expand Down Expand Up @@ -86,6 +87,15 @@ Below is a summary of the HTTP status codes that Edgee API uses.
}
}
```

```json Streaming Not Supported
{
"error": {
"code": "streaming_not_supported",
"message": "Streaming for Messages API is only supported when the model uses the Anthropic provider"
}
}
```
</ResponseExample>

### 401 Unauthorized
Expand Down
33 changes: 31 additions & 2 deletions api-reference/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,39 @@ When an error occurs, the Edgee API responds with a conventional HTTP response c

## Rate Limiting

Please note that the Edgee has its own rate limit technology to prevent abuse and ensure service stability.
If you exceed these limits, your requests will be throttled and you will receive a `429 Too Many Requests` response.
Please note that the Edgee has its own rate limit technology to prevent abuse and ensure service stability.
If you exceed these limits, your requests will be throttled and you will receive a `429 Too Many Requests` response.
Additionally, usage limits may be enforced based on your API key configuration.

## API Formats

Edgee supports two API formats to accommodate different use cases and provider preferences:

<CardGroup cols={2}>
<Card title="OpenAI Format" icon="robot" color="#8924A6">
Use `/v1/chat/completions` for maximum flexibility. Works with all providers (OpenAI, Anthropic, Google, Meta, etc.).

**Model format:** `provider/model` (e.g., `anthropic/claude-sonnet-4.5`)

**Recommended for:** New integrations, multi-provider applications, and maximum flexibility.
</Card>

<Card title="Anthropic Format" icon="message-square" color="#8924A6">
Use `/v1/messages` for native Anthropic Messages API format. Only works with Anthropic provider.

**Model format:** `model` (e.g., `claude-sonnet-4.5`)

**Recommended for:** Migrating from Anthropic's API, using Anthropic SDK, or requiring Anthropic-specific features.
</Card>
</CardGroup>

**Choose the format that best fits your needs:**

- **For new projects**: Use the OpenAI format (`/v1/chat/completions`) for maximum flexibility and multi-provider support.
- **For Anthropic migrations**: Use the Anthropic format (`/v1/messages`) for seamless compatibility with existing code using Anthropic's SDK.

Both formats provide the same underlying AI capabilities and support Edgee's features like token compression, edge tools, and observability.

## Features

<Columns cols={2}>
Expand Down
Loading