تخطي إلى المحتوى

هذه الصفحة متاحة باللغة الإنجليزية. يتم الاحتفاظ بتفضيلك للغة العربية في الصفحات المترجمة.

Get started

Request access, create a key, discover your enabled models and make your first Grid call.

Use your existing OpenAI client with the Grid base URL and an enabled model ID. Discover the models available to your account before making the first call.

The developer starting point has copyable Python, Node.js and cURL examples, with access, troubleshooting and deployment review in one place.

1. Get access#

Grid is by invitation while we scale. Use Request access in this site's navigation. Our team reviews the request and confirms your account's enabled models and terms.

The public model catalog helps you compare options. Your account's model list determines what you can call.

2. Create an API key#

Open the Grid Console, go to Keys, and create a key. The secret is shown once, at creation time. Store it before closing the dialog. If you lose it, revoke the key and create another.

Set the key in your local environment. Keep it on your server and out of browser code:

Shell

export FORLEX_API_KEY="your-key-here"

3. Discover your enabled models#

List the model IDs your account can use:

Shell

curl https://api.genai.forlex.cloud/v1/models \
  -H "Authorization: Bearer $FORLEX_API_KEY"

Choose an enabled model that supports chat completions. Copy its exact id from the response into your environment:

Shell

export GRID_MODEL_ID="replace-with-an-enabled-chat-model-id"

Public model names and publisher checkpoint names are comparison references. Use the ID returned for your account in an API request. Pin the selected ID when you need release control.

4. Make your first call#

Point the client at https://api.genai.forlex.cloud/v1. The examples read the key and the enabled model ID you set above.

Python

import os
import openai

client = openai.OpenAI(
    base_url="https://api.genai.forlex.cloud/v1",
    api_key=os.environ["FORLEX_API_KEY"],
)

resp = client.chat.completions.create(
    model=os.environ["GRID_MODEL_ID"],
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
TypeScript

import OpenAI from 'openai'

const model = process.env.GRID_MODEL_ID
if (!model) throw new Error('Set GRID_MODEL_ID from your enabled model list')

const client = new OpenAI({
  baseURL: 'https://api.genai.forlex.cloud/v1',
  apiKey: process.env.FORLEX_API_KEY,
})

const resp = await client.chat.completions.create({
  model,
  messages: [{ role: 'user', content: 'Hello!' }],
})
console.log(resp.choices[0].message.content)

The cURL example uses Python 3 to encode the request body as JSON.

Shell

set -o pipefail
: "${FORLEX_API_KEY:?Set FORLEX_API_KEY first}" "${GRID_MODEL_ID:?Set GRID_MODEL_ID first}"

python3 - <<'PY' | curl https://api.genai.forlex.cloud/v1/chat/completions \
  --fail-with-body \
  -H "Authorization: Bearer $FORLEX_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @-
import json, os
print(json.dumps({
    "model": os.environ["GRID_MODEL_ID"],
    "messages": [{"role": "user", "content": "Hello!"}],
}))
PY

Authentication uses the standard Authorization bearer-token header. The official OpenAI SDKs use this header with the Grid base URL.

5. Handle the cold start#

Serverless scales to zero. An idle lane can return 503 with a Retry-After header while it warms up. Retry after the interval in the header. Add retry handling before production if your client does not already provide it.

Errors and cold start explains the response codes and retry behaviour.

6. Review usage and cost#

Open the Console usage dashboard to review consumption by model, run mode and period. Billing and metering explains what the meter counts, and Pricing provides the public comparison rates.

Next#

Start with a pinned enabled model. Smart Router is opt-in per request when you want Grid to choose a route. For an enterprise workflow with integration and acceptance requirements, scope a project.

طلب الوصول

الوصول إلى Agent API وGrid متاح بدعوة. يتم تأكيد الخدمات المفعّلة والشروط أثناء التأهيل.

تبقى المسودات خلال زيارة المتصفح هذه فقط. يؤدي تحديث الصفحة إلى مسحها.

تتم معالجتها بموجب إشعار الخصوصية وحماية البيانات (GDPR وLGPD وCCPA). لا يتم بيع أو مشاركة أي بيانات شخصية.

تحدث إلينا

أخبرنا من أنت وما الذي تحتاج إلى مراجعته.

تبقى المسودات خلال زيارة المتصفح هذه فقط. يؤدي تحديث الصفحة إلى مسحها.

يحتفظ كل موضوع بمتطلباته الخاصة خلال هذه الزيارة. تغيير الموضوع يحتفظ ببيانات الاتصال الخاصة بك.

تتم معالجتها بموجب إشعار الخصوصية وحماية البيانات (GDPR وLGPD وCCPA). لا يتم بيع أو مشاركة أي بيانات شخصية.

[ضوابط الخصوصية والقياس عن بُعد]

تفضيلات حماية البيانات والقياس عن بُعد

تحترم Forward Intelligence (التي تُدار دوليًا بواسطة Forlex, LLC وفي البرازيل بواسطة Forlex Ltda) حقوقك بموجب اللائحة العامة لحماية البيانات (GDPR) في الاتحاد الأوروبي والمملكة المتحدة، وقانون حماية البيانات العامة البرازيلي (LGPD - القانون رقم 13.709/2018)، وقانون خصوصية المستهلك في كاليفورنيا (CCPA/CPRA).

التخزين الضروري للغايةنشط دائمًا

يخزن سمة الألوان (grid-theme)، وحالة التنقل في الوثائق، وتفضيل الخصوصية الخاص بك (fwdi_privacy_consent_v1) محليًا في متصفحك. لا يتم تعيين أي ملفات تعريف ارتباط لطرف ثالث أو أدوات تتبع عبر المواقع.

يخزن محدد اللغة تفضيلك فقط في ملف تعريف ارتباط للطرف الأول (fwdi-language)، لمدة تصل إلى عام واحد. ولا يؤدي هذا إلى تفعيل التحليلات الاختيارية.

تحليلات المسارات وقمع التحويل المنقحةمعطّل

تجمع مشاهدات الصفحة الإجمالية على المسارات التسويقية المسموح بها وأحداث قمع التحويل التجاري العامة عبر @vercel/analytics. يتم تنقيح سلاسل الاستعلام والمسارات الديناميكية والبيانات الشخصية على جانب العميل قبل الإرسال.

اقرأ إشعار GDPR / LGPD / CCPA الكامل