# Upstream status

Source: https://immiscible.fly.dev/docs/api/get-v1-upstreams

`GET /v1/upstreams`

Which providers have a usable credential, and each one's breaker state. Admin key.

## Authentication

Workspace key, admin scope. A gateway key issued with the `admin` scope, sent as `Authorization: Bearer`. An inference-scoped key gets `403` here.

## Request

curl:

```bash
curl "https://immiscible.fly.dev/v1/upstreams" \
  -H "authorization: Bearer $IMMISCIBLE_ADMIN_KEY"
```

Node:

```ts
const res = await fetch('https://immiscible.fly.dev/v1/upstreams', {
  headers: {
    authorization: `Bearer ${process.env.IMMISCIBLE_ADMIN_KEY}`,
  },
});
const data = await res.json();
console.log(res.status, data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://immiscible.fly.dev/v1/upstreams",
    headers={
        "authorization": f"Bearer {os.environ['IMMISCIBLE_ADMIN_KEY']}",
    },
)
print(res.status_code, res.json())
```

## Response

```json
{
  "data": [
    {
      "provider": "openai",
      "kind": "openai",
      "base": "https://api.openai.com/v1",
      "envKey": "OPENAI_API_KEY",
      "configured": false
    }
  ]
}
```
