---
title: "Create External API Configuration"
method: POST
path: "/v1/external-apis"
tags: ["Agents External APIs"]
---

# Create External API Configuration

`POST /v1/external-apis`

## Request

- Base URL: `https://api.bey.dev`
- URL: `https://api.bey.dev/v1/external-apis`
- Auth: API key in header `x-api-key`

Create an external API configuration.

Securely stores credentials for an external service (such as an
OpenAI-compatible LLM or your ElevenLabs account) so agents can reference
it by ID. The secret itself is never returned in responses. Fails if the
service rejects the key, which is only checked for ElevenLabs so far.

## Request body

- union
  - CreateOpenaiCompatibleLlmExternalApiRequest: Request body to create an OpenAI-compatible LLM API configuration.
    - `type` 'openai_compatible_llm'
    - `name` string, required
    - `url` string, required
    - `api_key` string, password, required
  - CreateElevenlabsExternalApiRequest: Request body to create an ElevenLabs API configuration.
    - `type` 'elevenlabs'
    - `name` string, required
    - `api_key` string, password, required

## Response `201`

Created External API Configuration with ID

- union
  - OpenaiCompatibleLlmExternalApiResponse: Response body for an OpenAI-compatible LLM API configuration.
    - `id` string, required: Unique identifier of the object in the database.
    - `type` 'openai_compatible_llm'
    - `name` string, required
    - `url` string, required
  - ElevenlabsExternalApiResponse: Response body for an ElevenLabs API configuration.
    - `id` string, required: Unique identifier of the object in the database.
    - `type` 'elevenlabs'
    - `name` string, required

## Other responses

- `401`: Authentication failed. The `x-api-key` header is missing or the provided API key is invalid.
- `402`: The plan's usage limit has been reached, or the requested feature requires a plan upgrade.
- `403`: The API key is valid but not permitted to perform this action, because the resource belongs to someone else.
- `404`: The requested resource does not exist or is not accessible with this API key.
- `422`: The request is malformed. `detail` lists each field that failed validation, where it was located, and why.
- `429`: The plan's limit on the number of concurrent sessions has been reached.

## Changes

- **2026-10-20** `0469e200c235`: 1 info
  - added the non-success response with the status `402`
- **2026-10-16** `c8f80740b51c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bey-dev/apis/beyond-presence-api/changes/v1/external-apis/post.md)

---

[API](https://skmtc.dev/bey-dev/apis/beyond-presence-api.md) - [All operations](https://skmtc.dev/bey-dev/apis/beyond-presence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bey-dev/apis/beyond-presence-api/revisions/2d37d86bc5c1?raw)
