Referencia de la API

Credenciales de proveedores

Claves propias de proveedores de modelos, voz y habla.

GET /v1/provider-credentials

List the provider credentials of my organization

Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior

An `admin` or above, as a user. `items` always has the eleven providers (`openai`, `azure_openai`, `anthropic`, `google`, `deepgram`, `elevenlabs`, `cartesia`, `azure_speech`, `groq`, `cerebras`, `typesafe`), configured or not. `platform_keys_allowed` says whether a platform admin lets this organization fall back on the keys of eco when a provider has no credential of its own. Keys are write-only: they are stored sealed and never returned; a provider shows `configured` and a `key_mask` with the last four characters. 401 when the token is missing, expired or invalid; 403 below `admin` or with an API key; 503 when provider credentials are not available.

Respuestas

  • 200 Successful Response · ProviderCredentialList
    NombreTipoRequeridoDescripción
    itemsProviderCredential[]sí
    items[].api_versionstring | nullsí
    items[].base_urlstring | nullsí
    items[].configuredbooleansí
    items[].endpointstring | nullsí
    items[].has_service_accountbooleansí
    items[].key_maskstring | nullsí
    items[].providerstringsí (openai, azure_openai, anthropic, google, deepgram, elevenlabs, cartesia, azure_speech, groq, cerebras, typesafe)
    items[].regionstring | nullsí
    items[].updated_atstring (date-time) | nullsí
    items[].updated_bystring | nullsí
    items[].updated_by_namestring | null
    platform_keys_allowedbooleansí
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below `admin`, or an API key. · ErrorResponse
  • 503 Code `provider_credentials_unavailable`: not deployed. · ErrorResponse
  • default Default Response · ErrorResponse

PUT /v1/provider-credentials/{provider}

Set the credential of a provider

Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior

An `admin` or above, as a user. Stores the credential of `provider` for the organization. A secret field (`api_key`, `service_account_json`) left out or null keeps the stored value; the plain fields (`base_url`, `endpoint`, `api_version`, `region`) are replaced by the body. The first call needs `api_key`; `azure_openai` needs `endpoint` and `azure_speech` needs `region`; `service_account_json` (a JSON object, up to 64 KiB) is for `google` only, and the plain fields a provider does not have are rejected. URLs are `https`. Keys are write-only: they are stored sealed and never returned; a provider shows `configured` and a `key_mask` with the last four characters. Written to the audit log as `provider_credential.set` with the provider and the plain fields, never a secret. 401 when the token is missing, expired or invalid; 403 below `admin` or with an API key; 422 when a field is invalid or missing; 503 when provider credentials are not available.

Parámetros

NombreEnTipoRequeridoDescripción
providerpathstringsí

Cuerpo de la solicitud

NombreTipoRequeridoDescripción
api_keystring | null
api_versionstring | null
base_urlstring | null
endpointstring | null
regionstring | null
service_account_jsonstring | null

Respuestas

  • 200 Successful Response · ProviderCredential
    NombreTipoRequeridoDescripción
    api_versionstring | nullsí
    base_urlstring | nullsí
    configuredbooleansí
    endpointstring | nullsí
    has_service_accountbooleansí
    key_maskstring | nullsí
    providerstringsí (openai, azure_openai, anthropic, google, deepgram, elevenlabs, cartesia, azure_speech, groq, cerebras, typesafe)
    regionstring | nullsí
    updated_atstring (date-time) | nullsí
    updated_bystring | nullsí
    updated_by_namestring | null
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below `admin`, or an API key. · ErrorResponse
  • 503 Code `provider_credentials_unavailable`: not deployed. · ErrorResponse
  • default Default Response · ErrorResponse

DELETE /v1/provider-credentials/{provider}

Delete the credential of a provider

Solo para usuarios con sesión iniciada (sin API key) · Rol: admin o superior

An `admin` or above, as a user. Removes the credential of `provider`; deleting one that is not set is also 204. Written to the audit log as `provider_credential.delete`. 401 when the token is missing, expired or invalid; 403 below `admin` or with an API key; 503 when provider credentials are not available.

Parámetros

NombreEnTipoRequeridoDescripción
providerpathstringsí

Respuestas

  • 204 Successful Response
  • 401 Missing, expired or invalid token. · ErrorResponse
  • 403 Role below `admin`, or an API key. · ErrorResponse
  • 503 Code `provider_credentials_unavailable`: not deployed. · ErrorResponse
  • default Default Response · ErrorResponse