> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Credential ID • AI Agent SDK

> credential_id: Stable, non-secret identity for cross-replica quota coordination.

# credential\_id

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**AuthProfile**](../classes/AuthProfile) class in the [**failover**](../modules/failover) module.

Stable, non-secret identity for cross-replica quota coordination.

The coordinator keys benches by the *credential*, not the profile
label. `name` is a local display label: two replicas may name the
same key differently (breaking cooldown propagation) or reuse a name
like `"default"` for different keys (benching an unrelated key).
Derive a deterministic id from the fields that identify the credential
(provider, api\_key, base\_url) using a short salted hash so the real key
is never exposed. Falls back to `name` when no api\_key is present.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def credential_id() -> str
```

### Returns

<ResponseField name="Returns" type="str">
  The result of the operation.
</ResponseField>

## Uses

* `hexdigest`
* `hashlib.sha256`
* `encode`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/llm/failover.py#L120">
  `praisonaiagents/llm/failover.py` at line 120
</Card>
