Product
Jentic OSThe workplace. An in-house AI platform for every employeeJentic OneSafe access. Agents reach your systems without holding keysJentic AIRThe foundation. Gets your existing platforms ready for AI
Pricing
Developers

GET STARTED

API DirectoryBrowse 10,000+ APIs Ready For AI Agent IntegrationDocumentationGuides and API reference

TOOLS

API ScoringCheck your AI Readiness using our scorecardArazzo UIVisualize Arazzo Workflows As Interactive DocumentationArazzo EditorBuild And Edit Multi-Step API Workflows Visually

COMMUNITY

GitHubOpen source projects and examplesOpen StandardsBuilt on open specs. Never locked in.
Resources
Company
About UsOur mission and teamCareersJoin our teamContactGet in touch
Try it now
Jentic OSJentic OneJentic AIR
Pricing
API DirectoryDocumentationAPI ScoringArazzo UIArazzo EditorGitHubOpen Standards
Resources
About UsCareersContact
Try it now
JenticJentic
Products
  • Jentic OS
  • Jentic One
  • Jentic AIR
For Developers
  • API Directory
  • Documentation
  • GitHub
Company
  • About Jentic
  • Careers
  • Contact Us
  • Trust Centre
ISO/IEC 27001:2022 certification badge issued by Prescient SecurityISO/IEC 27001:2022 certification badge issued by Prescient Security

Information Security Management System

Certified to ISO/IEC 27001:2022 by Prescient Security

Terms & Conditions•Privacy Policy•
© 2026 Jentic Technology Ltd. All rights reserved.
Switch to light modeSwitch to dark mode
APIs / AI/ML / Portkey AI Gateway
Portkey AI Gateway logo

Portkey AI Gateway

Official vendor OpenAPI document · agent-readyAI/MLLanguage ModelsapiKey4 EndpointsREST

For Agents

Route chat completions, text completions, embeddings, and image generation requests to 250+ AI models through a single unified gateway endpoint.

Use for: I need to generate a chat completion using a specific model, I want to create embeddings for semantic search, Generate an image from a text prompt, Switch my AI provider without changing code

Not supported: Does not handle model fine-tuning, dataset management, or agent orchestration - use for inference routing only.

Portkey AI Gateway provides a unified OpenAI-compatible interface to access over 250 AI models from multiple providers through a single API. It supports chat completions, text completions, embeddings, and image generation with built-in caching, observability, and load balancing. Authentication uses a Portkey API key in the x-portkey-api-key header combined with a virtual key to identify the target AI provider.

Jentic One on GithubView OpenAPI Document

Install Jentic One Beta

Connect the Portkey AI Gateway to your agent

Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Portkey AI Gateway, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.

Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.

1

Step 1: Jentic One Host machine

# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fportkey.ai%2Fportkey" | sh
2

Step 2: Agent machine

# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fportkey.ai%2Fportkey" | sh
jentic register       # connects your agent to your Jentic One instance

Jentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.

Capabilities

What an agent can do with Portkey AI Gateway API.

Route chat completion requests to any of 250+ AI models with provider-agnostic parameters

Generate text embeddings from multiple embedding model providers through one endpoint

Create images from text prompts via supported generation models

Switch between AI providers without changing client code by swapping virtual keys

Stream partial chat completion responses via server-sent events for real-time output

Use Cases

Patterns agents use Portkey AI Gateway API for, with concrete tasks.

★ Multi-Provider Model Routing

Route AI inference requests to different providers (OpenAI, Anthropic, Cohere, and others) through a single API endpoint. Portkey handles provider-specific authentication and response format normalization, allowing teams to switch models by changing a virtual key rather than rewriting integration code. Supports fallback routing when a primary provider experiences downtime.

Send a chat completion request to GPT-4 through Portkey with messages containing a system prompt and user query, then verify the response includes token usage data

Embedding Generation for RAG Pipelines

Generate vector embeddings from text inputs for retrieval-augmented generation workflows. The embeddings endpoint accepts single strings or batches and returns float or base64-encoded vectors. Teams can switch embedding providers without modifying downstream vector storage logic.

Create embeddings for the text 'quarterly revenue report summary' using the text-embedding-3-small model and return the vector in float format

Streaming Chat for Interactive Applications

Enable real-time conversational interfaces by streaming partial chat completion tokens as server-sent events. The gateway handles streaming uniformly across providers, so client code receives a consistent SSE format regardless of which backend model generates the response.

Send a streaming chat completion request with stream set to true and process the partial message deltas as they arrive

AI Agent Gateway Integration via Jentic

AI agents use Jentic to discover Portkey Gateway operations by intent, such as 'generate a chat completion' or 'create text embeddings'. Jentic returns the operation schema with required parameters (model, messages) and handles Portkey API key injection, so agents call AI models without managing provider credentials directly.

Search Jentic for 'generate a chat completion', load the Portkey createChatCompletion schema, and execute a request with model gpt-4 and a user message

Key Endpoints

4 endpoints — portkey ai gateway provides a unified openai-compatible interface to access over 250 ai models from multiple providers through a single api.

METHOD

PATH

DESCRIPTION

POST

/chat/completions

Create a chat completion from a conversation

POST

/completions

Generate text completions from a prompt

POST

/embeddings

Create vector embeddings from text input

POST

/images/generations

Generate images from text prompts

POST

/chat/completions

Create a chat completion from a conversation

POST

/completions

Generate text completions from a prompt

POST

/embeddings

Create vector embeddings from text input

POST

/images/generations

Generate images from text prompts

Why Jentic?

What agents get from Jentic-routed access to this vendor.

Setup

Setup

Wiring the Portkey AI Gateway by hand means managing its x-portkey-api-key header, wiring a virtual key for each provider, and formatting inference requests yourself. Through Jentic you install once, import the Portkey AI Gateway from the API Directory, store the key once, and your agent calls it.

Permission scoping

Permission scoping

Portkey takes its prompts and model inputs in the request body, so you limit the agent to the operations it needs, such as chat completions or embeddings. Other operations like image generation are available only if you add them.

Credential management

Credential isolation

Your Portkey API key and virtual keys are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.

Intent-based discovery

Intent-based discovery

Agents search Jentic by intent such as 'generate a chat completion' or 'create embeddings', and Jentic returns the matching Portkey operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

Related APIs

Alternatives and complements available in the Jentic catalogue.

Complementary

OpenAI API

→

Direct access to OpenAI models without gateway routing

Use OpenAI directly when you only need OpenAI models and want to avoid the gateway layer. Use Portkey when you need multi-provider routing or observability.

Alternative

OpenRouter API

→

Another multi-model routing gateway with pay-per-token pricing

Choose OpenRouter when you want pay-per-token access to multiple providers without managing individual provider keys.

Complementary

Cohere API

→

Enterprise NLP and embedding models accessible directly or through Portkey

Use Cohere directly for enterprise RAG features like reranking and connectors that are not exposed through the Portkey gateway.

FAQs

Specific to using Portkey AI Gateway API through Jentic.

What authentication does the Portkey AI Gateway use?

Portkey uses two API keys passed as headers: x-portkey-api-key for your Portkey account authentication, and x-portkey-virtual-key to identify the target AI provider. Through Jentic, both keys are stored in the encrypted credential vault and injected automatically.

Can I route requests to different AI providers without changing my code?

Yes. The Portkey AI Gateway uses a virtual key system. You change the x-portkey-virtual-key header to switch between providers like OpenAI, Anthropic, or Cohere while keeping the same endpoint and request format. The chat completions, completions, and embeddings endpoints accept the same parameters regardless of the backend provider.

What are the rate limits for the Portkey AI Gateway?

Rate limits depend on your Portkey plan tier and the underlying AI provider's limits. The gateway passes through provider-specific rate limit headers. Check your Portkey dashboard for account-level limits and the target provider's documentation for model-specific constraints.

How do I generate embeddings through the Portkey AI Gateway with Jentic?

Install the SDK with pip install jentic, then search for 'create text embeddings'. Jentic returns the createEmbedding operation schema requiring model and input fields. Execute the call with your text input and receive embedding vectors in float or base64 format.

Does the Portkey AI Gateway support streaming responses?

Yes. Set the stream parameter to true in your chat completion or text completion request. The gateway returns partial message deltas as server-sent events in a consistent format, regardless of which backend AI provider generates the response.

Can I use function calling and tool use through the Portkey AI Gateway?

Yes. The chat completions endpoint supports the tools parameter for defining function schemas and tool_choice for controlling tool selection. The gateway passes tool calls and tool responses through to the underlying model, supporting up to 128 tool definitions per request.

Can I limit what my agent is allowed to do with the Portkey AI Gateway?

Yes. Because you run Jentic One yourself, your own rules decide which Portkey operations and credentials the agent may use. You can allow only the inference calls it needs, such as chat completions or embeddings, and leave text completions or image generation unimported so the agent cannot reach them. Since prompts and model inputs travel in the request body, scoping the agent to a single operation like chat completions keeps it from touching any endpoint you have not granted.

GET STARTED

Start building with Portkey AI Gateway API

Explore with Jentic One
View OpenAPI Document