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

# Phoenix

> TokenLab OpenAI uyumlu isteklerini Arize Phoenix ile izleyin

## Genel Bakış

Phoenix, TokenLab'in OpenAI uyumlu base URL'si ile yapılandırılmış OpenAI Python istemcisini otomatik olarak izleyerek (auto-instrumenting) TokenLab isteklerini takip edebilir.

<Note>
  **Tür**: Gözlemlenebilirlik (Observability)

  **Birincil Yol**: OpenAI SDK enstrümantasyonu

  **Destek Güveni**: Desteklenen OpenAI uyumlu izleme yolu
</Note>

## Kurulum

```bash theme={null}
pip install arize-phoenix openinference-instrumentation-openai openai
```

## Ortam

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## Phoenix'i Kaydedin

```python theme={null}
from phoenix.otel import register

tracer_provider = register(
    project_name="tokenlab-app",
    auto_instrument=True,
)
```

## TokenLab'i Çağırın

```python theme={null}
import os

from openai import OpenAI

client = OpenAI(
    api_key=os.environ["TOKENLAB_API_KEY"],
    base_url="https://api.tokenlab.sh/v1",
)

response = client.chat.completions.create(
    model="claude-sonnet-5",
    messages=[{"role": "user", "content": "Write a short haiku."}],
)

print(response.choices[0].message.content)
```

## Endpoint Notları

Phoenix, OpenAI SDK çağrı yolunu izler. Chat Completions tarzındaki TokenLab çağrıları için bu sayfayı kullanın. Diğer TokenLab yerel endpoint'leri, uygulama enstrümantasyonunuz bu istekler için kullandığınız istemciyi yakaladığı sürece izlenmeye devam edebilir.
