Skip to main content
POST
/
api
/
agent-server
/
api-keys
Create a new API key
curl --request POST \
  --url http://localhost:6060/api/agent-server/api-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "provider_type": "OpenAI",
  "name": "<string>",
  "api_key": "<string>"
}
'
{
  "error": true,
  "message": "<string>",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "provider_type": "<string>",
    "name": "<string>",
    "enabled": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "status": 123,
  "errorDetails": {}
}

Body

application/json
provider_type
enum<string>
required
Available options:
OpenAI,
Anthropic,
Gemini,
xAI
name
string
required
api_key
string
required

Response

API key created successfully

error
boolean
message
string
data
object
status
integer
errorDetails
object