Add detection
Scope OpenDetector AI-text review or prompt protection, with a separate detection contract and an operating policy.
Plan detection accessGrid / Developers
Make a small request with an OpenAI-compatible client and an enabled model. Evaluate useful results and cost before expanding.
Grid and training are by invitation. Your account determines enabled models and effective rates.
03 / First call
The examples read the key and model ID from your environment. They send one chat message and print the reply.
Before you run
Use an invited account, FORLEX_API_KEY and a chat-capable GRID_MODEL_ID from your enabled model list.
A successful request confirms access. Your evaluation determines whether a model fits the workflow.
Plan the evaluationInstall the SDK: python3 -m pip install openai. Save the example as first-call.py, then run python3 first-call.py.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.genai.forlex.cloud/v1",
api_key=os.environ["FORLEX_API_KEY"],
)
response = client.chat.completions.create(
model=os.environ["GRID_MODEL_ID"],
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)Access and setup
Grid is by invitation. Keep your key in your local environment or server configuration, outside browser code and source control. The examples use placeholders.
Once invited, open the Console, go to Keys and create an API key.
export FORLEX_API_KEY="replace-with-your-key"Set FORLEX_API_KEY first. Choose a model that supports chat completions from your account list and use its exact ID.
Replace both placeholders before running the first call.
curl https://api.genai.forlex.cloud/v1/models \
-H "Authorization: Bearer ${FORLEX_API_KEY:?Set FORLEX_API_KEY first}"export GRID_MODEL_ID="replace-with-an-enabled-chat-model-id"04 / Prepare for production
Add error handling, measure useful results and check consumption in the Console. Confirm data, deployment and operating requirements with the people who approve production.
Scope OpenDetector AI-text review or prompt protection, with a separate detection contract and an operating policy.
Plan detection accessPrepare a tool-specific configuration, then evaluate a pinned model on bounded coding tasks with your team.
Prepare a Connect setupDefine the task, data readiness and evaluation before choosing a checkpoint or training method.
Explore trainingBring the process and integrations. We scope the evaluation and implementation with your team.
Explore Projects