API Reference

Genfity AI Gateway provides a single endpoint compatible with standard chat completions (OpenAI) and Messages API (Anthropic) formats to access all AI models. Just change the base URL and use your Genfity API key.

BASE URL (OpenAI)https://ai.genfity.com/v1
BASE URL (Anthropic)https://ai.genfity.com

Quick start

Quick startcurl
curl https://ai.genfity.com/v1/models \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx"

Authentication

All requests require an API key sent via the Authorization header. Get your API key at Dashboard → API Keys.

HeaderTypeDescription
Authorizationstring requiredAPI Key in Bearer <api_key> format. Get it from the dashboard.
Examplebash
curl https://ai.genfity.com/v1/chat/completions \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"genfity/claude-opus-4.7","messages":[{"role":"user","content":"Hello"}]}'

Endpoints

Send requests to any AI model through the following endpoints.

POST/v1/chat/completionsOpenAI-compatible chat completion
POST/v1/messagesAnthropic-compatible messages
POST/v1/messages/count_tokensToken count estimation
POST/v1/embeddingsVector embeddings
GET/v1/modelsList available models
POST

Create Chat Completion (OpenAI)

/v1/chat/completions

Send an OpenAI-compatible chat completion request to any AI model in the Genfity catalog.

Headers

Authorizationstring requiredAPI Key in Bearer <api_key> format.
Content-Typestring requiredMust be application/json.

Request Body

modelstring requiredModel ID from catalog. See /v1/models.
messagesarray requiredArray of message objects with role and content.
streamboolean Enable SSE streaming. Default false.
max_tokensinteger Maximum output tokens.
temperaturenumber Sampling temperature (0-2).
top_pnumber Nucleus sampling (0-1).
toolsarray OpenAI-format tool calling definitions.
response_formatobject Output format, e.g. { type: json_object }.
Requestcurl
curl -X POST https://ai.genfity.com/v1/chat/completions \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "genfity/claude-opus-4.7",
    "messages": [
      { "role": "user", "content": "Apa ibukota Indonesia?" }
    ],
    "temperature": 0.7,
    "max_tokens": 256,
    "stream": false
  }'
Responsejson
{
  "id": "chatcmpl_01Hxx...",
  "object": "chat.completion",
  "created": 1778803200,
  "model": "genfity/claude-opus-4.7",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Ibukota Indonesia adalah Jakarta."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 8,
    "total_tokens": 22
  }
}
POST

Anthropic Messages

/v1/messages

Send an Anthropic-compatible request to any AI model. Suitable for Claude SDKs and tools requiring Messages API.

Headers

Authorizationstring requiredAPI Key in Bearer <api_key> format.
Content-Typestring requiredMust be application/json.

Request Body

modelstring requiredModel ID from catalog.
max_tokensinteger requiredMaximum output tokens.
messagesarray requiredArray of messages with role and content.
systemstring System prompt (optional).
streamboolean Enable SSE streaming.
toolsarray Tool definitions with input_schema.
tool_choiceobject Control which tool is called.
Requestcurl
curl -X POST https://ai.genfity.com/v1/messages \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "genfity/claude-opus-4.7",
    "max_tokens": 1024,
    "messages": [
      { "role": "user", "content": "Hello Genfity" }
    ]
  }'
Responsejson
{
  "id": "msg_01Hxx...",
  "type": "message",
  "role": "assistant",
  "model": "genfity/claude-opus-4.7",
  "content": [
    { "type": "text", "text": "Hello! How can I help you today?" }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 25,
    "output_tokens": 12
  }
}
POST

Count Tokens

/v1/messages/count_tokens

Estimate the number of tokens in a prompt before sending a generation request.

Headers

Authorizationstring requiredAPI Key in Bearer <api_key> format.

Request Body

modelstring requiredModel ID from catalog.
messagesarray requiredMessages to count.
Requestcurl
curl -X POST https://ai.genfity.com/v1/messages/count_tokens \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "genfity/claude-opus-4.7",
    "messages": [{"role":"user","content":"Count this text"}]
  }'
Responsejson
{
  "input_tokens": 12
}
POST

Embeddings

/v1/embeddings

Generate vector embeddings from input text. Only available for embedding models in the catalog.

Headers

Authorizationstring requiredAPI Key in Bearer <api_key> format.

Request Body

modelstring requiredEmbedding model ID from catalog.
inputstring | array requiredText or array of texts to embed.
Requestcurl
curl -X POST https://ai.genfity.com/v1/embeddings \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "genfity/claude-opus-4.7",
    "input": "Genfity AI Gateway makes AI integration simple."
  }'
Responsejson
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0023, -0.0091, 0.0042, ...]
    }
  ],
  "model": "genfity/claude-opus-4.7",
  "usage": { "prompt_tokens": 8, "total_tokens": 8 }
}
POST

Image Generation

/v1/images/generations

Generate images from text prompts using image generation models like GPT Image, FLUX, Stable Diffusion, and more.

Headers

Authorizationstring requiredAPI Key in Bearer <api_key> format.
Content-Typestring requiredMust be application/json.

Request Body

modelstring requiredImage model ID, e.g. openai/gpt-image-2, together/black-forest-labs/FLUX.2-pro, flux-kontext.
promptstring requiredDescription of the image to generate.
ninteger Number of images (default 1).
sizestring Image size, e.g. 1024x1024, 1024x1792.
qualitystring Quality: standard or hd.
response_formatstring Output format: url or b64_json.
Requestcurl
curl -X POST https://ai.genfity.com/v1/images/generations \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "prompt": "A beautiful sunset over Indonesian rice terraces",
    "n": 1,
    "size": "1024x1024"
  }'
Responsejson
{
  "created": 1778803200,
  "data": [
    {
      "url": "https://...",
      "revised_prompt": "A beautiful sunset over Indonesian rice terraces"
    }
  ]
}
GET

List Models

/v1/models

Get a list of all models available to your account.

Headers

Authorizationstring requiredAPI Key in Bearer <api_key> format.
Requestcurl
curl https://ai.genfity.com/v1/models \
  -H "Authorization: Bearer genfity_xxxxxxxxxxxx"
Responsejson
{
  "object": "list",
  "data": [
    { "id": "genfity/claude-opus-4.7", "object": "model", "owned_by": "genfity" }
  ]
}

Model & Pricing

Supported models and pricing per 1M tokens. Data is fetched directly from the active catalog database.

Loading models from database...

Error Codes

Genfity AI Gateway uses standard HTTP status codes.

CodeMessageMeaning
400invalid_jsonBody is not valid JSON.
400missing_modelModel field is empty.
400model_not_allowedModel not found or inactive in catalog.
400max_tokens_requiredPAYG/credit requires max_tokens limit.
401missing_api_keyAuthorization header is empty.
401invalid_api_key_formatHeader is not a Bearer token.
401invalid_api_keyKey is invalid or revoked.
402no_active_subscriptionKey has no active subscription.
402subscription_not_covering_modelPlan does not cover this model.
402credit_cost_not_configuredModel has no credit cost configured.
402payg_price_not_configuredModel has no PAYG price configured.
402insufficient_credit_balanceInsufficient credit balance.
402insufficient_balanceInsufficient balance.
403forbiddenNo access to this model.
429rate_limit_exceededRPM/TPM/concurrency limit exceeded.
429quota_exceededPeriod token quota exhausted.
429global_rate_limit_exceededIP burst guard exceeded.
500internal_errorInternal gateway error.
502router_unavailableThe model/provider is under high traffic. Try again later.
502upstream_errorThe model/provider is under high traffic. Try again later.
502all_candidates_failedThe model/provider is under high traffic. Try again later.
503service_unavailableService is under maintenance.

Rate Limits

Request limits are set per API key from Dashboard → API Keys. When limits are exceeded, the API returns 429 Too Many Requests.

Per-key limits
  • rate_limit_per_minRequests per minute per key
  • quota_tokens_monthlyMonthly token quota
  • concurrent_limitConcurrent requests
Global IP guard
  • • Window: 1 minute
  • • Scope: IP + endpoint path
  • • Error: global_rate_limit_exceeded

IDE & Editor

Genfity AI Gateway uses OpenAI-compatible and Anthropic-compatible formats, so almost any IDE, CLI, or SDK that supports custom base URLs works out of the box. Just change the base URL and use your Dashboard API key.

Cline

Autonomous coding agent for VS Code

Cline supports OpenAI Compatible providers. Fill in base URL, API key, and model ID in the Settings panel.

Setup
  1. 1Install the Cline extension from VS Code Marketplace.
  2. 2Open the Cline panel (left sidebar), click the Settings icon.
  3. 3API Provider → choose OpenAI Compatible.
  4. 4Fill the fields according to the snippet, click Done.
https://cline.bot
Clineini
API Provider   = OpenAI Compatible
Base URL       = https://ai.genfity.com/v1
API Key        = genfity_xxxxxxxxxxxx
Model ID       = genfity/claude-opus-4.7

Roo Code

Cline fork with multi-mode agents

Roo Code (Cline fork) uses the same configuration — choose OpenAI Compatible then fill the Genfity base URL and key.

Setup
  1. 1Install the Roo Code extension from VS Code Marketplace.
  2. 2Open the Roo Code panel, click Settings or profile name.
  3. 3API Provider: OpenAI Compatible (not OpenAI).
  4. 4Save the profile, pick a mode (Code/Architect/Ask) and start prompting.
https://roocode.com
Roo Codeini
API Provider   = OpenAI Compatible
Base URL       = https://ai.genfity.com/v1
API Key        = genfity_xxxxxxxxxxxx
Model ID       = genfity/claude-opus-4.7

Continue.dev

Autopilot for VS Code & JetBrains

Continue uses ~/.continue/config.yaml to declare providers. Add an openai-compatible entry with the Genfity apiBase.

Setup
  1. 1Install the Continue extension in VS Code / JetBrains.
  2. 2Open ~/.continue/config.yaml (Continue: Open Config).
  3. 3Add a Genfity model under the models key.
  4. 4Reload — the model will appear in Continue's chat dropdown.
https://continue.dev
Continue.devyaml
models:
  - name: Genfity Claude Opus
    provider: openai
    model: genfity/claude-opus-4.7
    apiBase: https://ai.genfity.com/v1
    apiKey: genfity_xxxxxxxxxxxx
    roles:
      - chat
      - edit
      - apply

Cursor

AI-native code editor

Cursor supports Override OpenAI Base URL at Settings → Models. Enable OpenAI API Key, then point base URL to Genfity.

Setup
  1. 1Cursor Settings → Models → scroll to OpenAI API Key.
  2. 2Enter API key: genfity_xxxxxxxxxxxx.
  3. 3Expand section → enable Override OpenAI Base URL.
  4. 4Set base URL: https://ai.genfity.com/v1. Click Verify.
  5. 5Enable only models available in the Genfity catalog.
https://cursor.com
Cursorini
OpenAI API Key           = genfity_xxxxxxxxxxxx
Override Base URL        = https://ai.genfity.com/v1
Enabled Models           = genfity/claude-opus-4.7, ...

Windsurf (Codeium)

Agentic IDE by Codeium

Windsurf Cascade supports custom model endpoints. Add an OpenAI-compatible provider via Settings → Cascade → Add Custom Model.

Setup
  1. 1Settings (Cmd/Ctrl + ,) → Cascade → Models.
  2. 2Add Custom Model → choose OpenAI protocol.
  3. 3Fill Base URL + Genfity API Key + Model ID.
  4. 4Enable the new model and start a Cascade session.
https://windsurf.com
Windsurf (Codeium)ini
Protocol     = OpenAI
Endpoint     = https://ai.genfity.com/v1
API Key      = genfity_xxxxxxxxxxxx
Model ID     = genfity/claude-opus-4.7
Display Name = Genfity Claude Opus

Zed

High-performance collaborative editor

Zed supports OpenAI API Compatible providers via settings.json. Add Genfity as a custom provider, then store the API key through Agent Panel settings.

Setup
  1. 1Zed → Cmd/Ctrl + , → open settings.json.
  2. 2Add the language_models.openai_compatible key as in the snippet.
  3. 3Open Agent Panel settings (Cmd/Ctrl + Shift + P → agent: open settings).
  4. 4Find the "Genfity AI Gateway" provider, paste your API key, press Enter.
  5. 5Select a Genfity model from the Agent Panel model dropdown.
https://zed.dev
Zedjson
{
  "language_models": {
    "openai_compatible": {
      "Genfity AI Gateway": {
        "api_url": "https://ai.genfity.com/v1",
        "available_models": [
          {
            "name": "genfity/auto",
            "display_name": "Genfity Auto (Combo)",
            "max_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true
            }
          },
          {
            "name": "genfity/claude-opus-4.7",
            "display_name": "Genfity Claude Opus 4.7",
            "max_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true
            }
          },
          {
            "name": "genfity/claude-haiku-4.5",
            "display_name": "Genfity Claude Haiku 4.5",
            "max_tokens": 200000,
            "capabilities": {
              "tools": true,
              "images": true
            }
          }
        ]
      }
    }
  },
  "agent": {
    "default_model": {
      "provider": "openai_compatible",
      "model": "genfity/auto"
    }
  }
}

CLI & Terminal

Genfity AI Gateway uses OpenAI-compatible and Anthropic-compatible formats, so almost any IDE, CLI, or SDK that supports custom base URLs works out of the box. Just change the base URL and use your Dashboard API key.

Claude Code

Anthropic's official CLI

Claude Code uses the Anthropic-compatible endpoint. Set the ANTHROPIC_BASE_URL environment variable to Genfity.

Setup
  1. 1Install: npm install -g @anthropic-ai/claude-code.
  2. 2Set environment variables: ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL.
  3. 3Run claude in your terminal at the project root.
https://claude.com/claude-code
Claude Codebash
export ANTHROPIC_AUTH_TOKEN="genfity_xxxxxxxxxxxx"
export ANTHROPIC_BASE_URL="https://ai.genfity.com"
export ANTHROPIC_MODEL="genfity/claude-opus-4.7"
export ANTHROPIC_SMALL_FAST_MODEL="genfity/claude-haiku-4.5"
export API_TIMEOUT_MS="300000"

claude

opencode

AI coding agent in your terminal (SST)

opencode is an open-source TUI-based coding agent. Add Genfity as an OpenAI-compatible provider.

Setup
  1. 1Install: curl -fsSL https://opencode.ai/install | bash.
  2. 2Create ~/.config/opencode/opencode.json (global) or opencode.json at project root.
  3. 3Set API key: export GENFITY_KEY="genfity_xxxxxxxxxxxx".
  4. 4Run opencode in your terminal and select the Genfity provider.
https://opencode.ai
opencodejson
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "genfity": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Genfity",
      "options": {
        "baseURL": "https://ai.genfity.com/v1",
        "apiKey": "{env:GENFITY_KEY}"
      },
      "models": {
        "genfity/claude-opus-4.7": { "name": "Claude Opus 4.7" }
      }
    }
  }
}

Codex CLI

OpenAI Codex CLI agent

Codex CLI supports OpenAI-compatible providers via ~/.codex/config.toml. Add Genfity as a custom provider.

Setup
  1. 1Install: npm i -g @openai/codex.
  2. 2Edit ~/.codex/config.toml — add the [model_providers.genfity] block.
  3. 3Set API key: export GENFITY_KEY="genfity_xxxxxxxxxxxx".
  4. 4Run: codex --provider genfity --model genfity/claude-opus-4.7.
https://github.com/openai/codex
Codex CLItoml
model_provider = "genfity"
model = "genfity/claude-opus-4.7"

[model_providers.genfity]
name = "Genfity"
base_url = "https://ai.genfity.com/v1"
env_key = "GENFITY_KEY"
wire_api = "chat"

Aider

AI pair programming in your terminal

Aider reads OpenAI-style environment variables. Override OPENAI_API_BASE and OPENAI_API_KEY for Genfity.

Setup
  1. 1Install: pipx install aider-chat or pip install aider-chat.
  2. 2Export environment variables (shell profile or .env).
  3. 3Run from project root: aider --model openai/genfity/claude-opus-4.7.
https://aider.chat
Aiderbash
export OPENAI_API_BASE="https://ai.genfity.com/v1"
export OPENAI_API_KEY="genfity_xxxxxxxxxxxx"

aider --model openai/genfity/claude-opus-4.7

LLM (Simon Willison)

Versatile CLI + Python library for any LLM

LLM CLI uses the llm-openai-plugin for OpenAI-compatible providers. Register Genfity as a new model.

Setup
  1. 1Install: pipx install llm then llm install llm-openai-plugin.
  2. 2Save API key: llm keys set genfity (paste genfity_xxxxxxxxxxxx).
  3. 3Edit extra-openai-models.yaml in the llm config dir.
  4. 4Test: llm -m genfity/claude-opus 'hello'.
https://llm.datasette.io
LLM (Simon Willison)yaml
- model_id: genfity/claude-opus
  model_name: genfity/claude-opus-4.7
  api_base: "https://ai.genfity.com/v1"
  api_key_name: genfity
  can_stream: true

Desktop & Web UI

Genfity AI Gateway uses OpenAI-compatible and Anthropic-compatible formats, so almost any IDE, CLI, or SDK that supports custom base URLs works out of the box. Just change the base URL and use your Dashboard API key.

LibreChat

Self-hosted multi-model chat UI

LibreChat uses librechat.yaml to register custom endpoints. Add Genfity as a custom endpoint.

Setup
  1. 1Copy librechat.example.yaml → librechat.yaml (deploy root).
  2. 2Add the endpoints.custom block as shown.
  3. 3Set GENFITY_KEY in .env (mounted to the container).
  4. 4Restart the container: docker compose up -d.
https://librechat.ai
LibreChatyaml
version: 1.0.9
endpoints:
  custom:
    - name: "Genfity"
      apiKey: "${GENFITY_KEY}"
      baseURL: "https://ai.genfity.com/v1"
      models:
        default: ["genfity/claude-opus-4.7"]
        fetch: true
      titleModel: "genfity/claude-haiku-4.5"
      summarize: false
      forcePrompt: false

Open WebUI

Extensible ChatGPT-style web UI

Open WebUI can add multiple OpenAI-compatible connections in Admin Settings.

Setup
  1. 1Sign in as admin → Admin Panel → Settings → Connections.
  2. 2OpenAI API → click + to add a new connection.
  3. 3Fill: API Base URL = https://ai.genfity.com/v1, API Key = genfity_xxxxxxxxxxxx.
  4. 4Save → Genfity models appear in the Workspace dropdown.
https://openwebui.com
Open WebUIini
API Base URL = https://ai.genfity.com/v1
API Key      = genfity_xxxxxxxxxxxx
Prefix ID    = genfity (optional)

Chatbox

Cross-platform desktop AI client

Chatbox supports a custom OpenAI host. Open Settings → AI Model → choose OpenAI API and fill the Genfity host + key.

Setup
  1. 1Download Chatbox (macOS/Windows/Linux) or use the web version.
  2. 2Settings → Model → AI Provider = OpenAI API.
  3. 3Fill API Key + API Host = https://ai.genfity.com/v1.
  4. 4Choose Model = genfity/claude-opus-4.7 → Save.
https://chatboxai.app
Chatboxini
AI Provider = OpenAI API
API Key     = genfity_xxxxxxxxxxxx
API Host    = https://ai.genfity.com/v1
Model       = genfity/claude-opus-4.7

Jan

Offline-first personal AI

Jan supports remote providers via Settings → Model Providers → OpenAI.

Setup
  1. 1Settings → Model Providers → OpenAI.
  2. 2Fill API Key = genfity_xxxxxxxxxxxx, Base URL = https://ai.genfity.com/v1.
  3. 3Models tab → import a model with ID genfity/claude-opus-4.7.
  4. 4Start a new thread and pick the Genfity model.
https://jan.ai
Janini
Provider  = OpenAI (compatible)
Base URL  = https://ai.genfity.com/v1
API Key   = genfity_xxxxxxxxxxxx
Model ID  = genfity/claude-opus-4.7

LM Studio

Desktop UI for local + remote LLMs

LM Studio supports remote OpenAI-compatible endpoints via the Connect to a server feature.

Setup
  1. 1LM Studio → Chat icon → click Select a model.
  2. 2Dropdown → Server settings → Add remote endpoint.
  3. 3Base URL = https://ai.genfity.com/v1, API Key = genfity_xxxxxxxxxxxx.
  4. 4Click Load → choose genfity/claude-opus-4.7.
https://lmstudio.ai
LM Studioini
Base URL = https://ai.genfity.com/v1
API Key  = genfity_xxxxxxxxxxxx
Model    = genfity/claude-opus-4.7

SDK & Framework

Genfity AI Gateway uses OpenAI-compatible and Anthropic-compatible formats, so almost any IDE, CLI, or SDK that supports custom base URLs works out of the box. Just change the base URL and use your Dashboard API key.

OpenAI Python SDK

Official Python client

The OpenAI Python SDK accepts a base_url argument. Just change the base URL and API key.

Setup
  1. 1Install: pip install openai.
  2. 2Instantiate the client with the Genfity base URL.
  3. 3Call chat.completions.create(...) as usual.
https://github.com/openai/openai-python
OpenAI Python SDKpython
from openai import OpenAI

client = OpenAI(
    api_key="genfity_xxxxxxxxxxxx",
    base_url="https://ai.genfity.com/v1",
)

res = client.chat.completions.create(
    model="genfity/claude-opus-4.7",
    messages=[{"role": "user", "content": "Hello Genfity"}],
)
print(res.choices[0].message.content)

OpenAI Node SDK

Official TypeScript / Node client

The OpenAI Node SDK accepts a baseURL on instantiation. Fully compatible with Genfity chat completions.

Setup
  1. 1Install: npm i openai.
  2. 2Set GENFITY_KEY env var, then use as in the snippet.
https://github.com/openai/openai-node
OpenAI Node SDKtypescript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.GENFITY_KEY,
  baseURL: "https://ai.genfity.com/v1",
});

const res = await client.chat.completions.create({
  model: "genfity/claude-opus-4.7",
  messages: [{ role: "user", content: "Hello Genfity" }],
});
console.log(res.choices[0].message.content);

Anthropic Python SDK

Official Anthropic Python client

The Anthropic Python SDK accepts a base_url argument. Use the Genfity /v1/messages endpoint.

Setup
  1. 1Install: pip install anthropic.
  2. 2Instantiate the client with the Genfity base URL (without /v1).
  3. 3Call messages.create(...) as usual.
https://github.com/anthropics/anthropic-sdk-python
Anthropic Python SDKpython
import anthropic

client = anthropic.Anthropic(
    api_key="genfity_xxxxxxxxxxxx",
    base_url="https://ai.genfity.com",
)

message = client.messages.create(
    model="genfity/claude-opus-4.7",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello Genfity"}],
)
print(message.content[0].text)

Anthropic Node SDK

Official Anthropic TypeScript client

The Anthropic Node SDK accepts a baseURL on instantiation. Use the Genfity /v1/messages endpoint.

Setup
  1. 1Install: npm i @anthropic-ai/sdk.
  2. 2Instantiate the client with the Genfity base URL (without /v1).
  3. 3Call messages.create(...) as usual.
https://github.com/anthropics/anthropic-sdk-typescript
Anthropic Node SDKtypescript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.GENFITY_KEY,
  baseURL: "https://ai.genfity.com",
});

const message = await client.messages.create({
  model: "genfity/claude-opus-4.7",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello Genfity" }],
});
console.log(message.content[0].text);

LangChain

LLM orchestration framework

Use ChatOpenAI with the Genfity base_url — pattern is identical to OpenAI direct.

Setup
  1. 1Install: pip install langchain-openai.
  2. 2Instantiate ChatOpenAI with base_url + api_key.
https://python.langchain.com
LangChainpython
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="genfity/claude-opus-4.7",
    api_key="genfity_xxxxxxxxxxxx",
    base_url="https://ai.genfity.com/v1",
    temperature=0.2,
)

print(llm.invoke("Hello Genfity").content)

Vercel AI SDK

TypeScript toolkit for AI apps

Use @ai-sdk/openai with the createOpenAI({ baseURL }) helper.

Setup
  1. 1Install: npm i ai @ai-sdk/openai.
  2. 2Call createOpenAI with the Genfity baseURL.
https://sdk.vercel.ai
Vercel AI SDKtypescript
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const genfity = createOpenAI({
  apiKey: process.env.GENFITY_KEY!,
  baseURL: "https://ai.genfity.com/v1",
});

const { text } = await generateText({
  model: genfity("genfity/claude-opus-4.7"),
  prompt: "Hello Genfity",
});
console.log(text);

Laravel (PHP)

PHP HTTP client integration

Use Http::withToken to send requests to Genfity AI Gateway from Laravel.

Setup
  1. 1Set GENFITY_KEY in .env.
  2. 2Use Illuminate\Support\Facades\Http for POST requests.
  3. 3Parse the response with ->json().
https://laravel.com
Laravel (PHP)php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('GENFITY_KEY'))
    ->post('https://ai.genfity.com/v1/chat/completions', [
        'model' => 'genfity/claude-opus-4.7',
        'messages' => [
            ['role' => 'user', 'content' => 'Hello Genfity'],
        ],
    ]);

return $response->json();

Footer.cta.scheduleHeading

Footer.cta.scheduleBody

Footer.cta.consultNow
Footer.brand.alt