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

# Authentication and entities

> Authenticate with W&B and select the correct personal or team entity.

Send a W\&B API key as an HTTP bearer token:

```http theme={"system"}
Authorization: Bearer <wandb-api-key>
```

The service resolves the W\&B viewer, default entity, and team memberships on every management request. The proxy caches the same identity by a hash of the key.

## Management entity selection

Omit the entity header to use the key's default entity:

```bash theme={"system"}
curl https://distillation.training.wandb.ai/v1/tasks \
  -H "Authorization: Bearer $WANDB_API_KEY"
```

Select an accessible team with one header:

```bash theme={"system"}
curl https://distillation.training.wandb.ai/v1/tasks \
  -H "Authorization: Bearer $WANDB_API_KEY" \
  -H "Wandb-Entity: your-team"
```

Entity query parameters are rejected. This prevents resource filters from being confused with ownership.

## Proxy entity selection

The OpenAI client does not have a portable custom-header convention across every integration, so proxy requests select the entity in the JSON body:

```json theme={"system"}
{
  "model": "ticket-classifier",
  "messages": [{"role": "user", "content": "Hello"}],
  "metadata": {"wandb.entity": "your-team"}
}
```

In the Python OpenAI SDK, pass metadata through `extra_body`.

## Production credentials

Prefer a W\&B team service-account key for deployed applications and long-running jobs. Personal credentials couple availability to one employee's access and default to that employee's personal entity.
