> ## 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.

# بوابة Portkey

> استخدم TokenLab كمزود أساسي (upstream provider) في بوابة Portkey

## نظرة عامة

يمكن لبوابة Portkey توجيه الطلبات إلى TokenLab كمزود أساسي. الخيار الافتراضي الأكثر أماناً هو إكمال المحادثات المتوافق مع OpenAI؛ استخدم Responses عندما يكشف إصدار Portkey الخاص بك عن هذا المسار لـ TokenLab.

<Note>
  **النوع**: بوابة ذكاء اصطناعي (AI Gateway)

  **المسارات الأساسية**: إكمال المحادثات المتوافق مع OpenAI و Responses

  **مستوى دعم المسار**: مسار مدعوم
</Note>

## قيم المزود

| الحقل             | القيمة                       |
| ----------------- | ---------------------------- |
| المزود            | `tokenlab`                   |
| Base URL          | `https://api.tokenlab.sh/v1` |
| API key           | `sk-your-tokenlab-key`       |
| النموذج الافتراضي | `gpt-5.4-mini`               |

## إكمال المحادثات (Chat Completions)

استخدم TokenLab لطلبات المحادثة المتوافقة مع OpenAI:

```bash theme={null}
curl https://your-portkey-gateway.example/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "x-portkey-provider: tokenlab" \
  -H "Authorization: Bearer sk-your-tokenlab-key" \
  -d '{
    "model": "gpt-5.4-mini",
    "messages": [{"role": "user", "content": "Say hello from TokenLab."}]
  }'
```

## الردود (Responses)

إذا كان إصدار Portkey الخاص بك يوجه ردود TokenLab، فاستخدم `gpt-5.5` أو `gpt-5.4` أو `gpt-5.4-mini` مع `/v1/responses`.

## ملاحظة حول نقطة النهاية الأصلية (Native Endpoint)

يوفر TokenLab أيضاً نقاط نهاية متوافقة مع Anthropic Messages و Gemini بشكل مباشر. تعتمد إمكانية استخدامها من خلال Portkey على دعم المزود ونقطة النهاية في الإصدار الذي قمت بنشره.
