HydraCore
API by router

Providers

List Providers

GET
/v1/providers

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/providers'
Example Response
[  {    "auth_type": "string",    "base_url": "string",    "docs_url": "string",    "has_key": false,    "id": "string",    "key_env_hint": "string",    "model_count": 0,    "models": [      {        "capabilities": [          "string"        ],        "context_window": 0,        "id": "string",        "input_cost_per_1m": 0,        "is_default": true,        "max_output_tokens": 0,        "name": "string",        "output_cost_per_1m": 0      }    ],    "name": "string",    "rate_limit_note": "string",    "supports_streaming": true  }]

List Stored Keys

GET
/v1/providers/keys

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://example.com/v1/providers/keys'
Example Response
[  {    "created_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_valid": true,    "key_suffix": "string",    "label": "string",    "last_validated_at": "2019-08-24T14:15:22Z",    "provider_id": "string"  }]

Store Key

POST
/v1/providers/keys

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
api_key*Api Key
Length8 <= length <= 500
label?Label
Lengthlength <= 100
Default"default"
provider_id*Provider Id
Length1 <= length <= 50

Response Body

Successful Response

application/json
  1. response
id*Id
Formatuuid
key_suffix*Key Suffix
message*Message
provider_id*Provider Id
Example Request
curl -X POST 'https://example.com/v1/providers/keys' \  -H 'Content-Type: application/json' \  -d '{  "api_key": "stringst",  "provider_id": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "key_suffix": "string",  "message": "string",  "provider_id": "string"}

Delete Key

DELETE
/v1/providers/keys/{provider_id}

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Path Parameters

provider_id*Provider Id

Header Parameters

X-Api-Key?string|null

Response Body

Successful Response

Example Request
curl -X DELETE 'https://example.com/v1/providers/keys/string'
Example Response
Empty

Validate Key

POST
/v1/providers/validate

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Header Parameters

X-Api-Key?string|null

Request Body

application/json
  1. body
api_key*Api Key
Length8 <= length <= 500
provider_id*Provider Id
Length1 <= length <= 50

Response Body

Successful Response

application/json
  1. response
message*Message
provider_id*Provider Id
valid*Valid
Example Request
curl -X POST 'https://example.com/v1/providers/validate' \  -H 'Content-Type: application/json' \  -d '{  "api_key": "stringst",  "provider_id": "string"}'
Example Response
{  "message": "string",  "provider_id": "string",  "valid": true}