AI Gateway
Models Endpoint
GET /v1/models — OpenAI-compatible model list
The gateway exposes an OpenAI-compatible GET /v1/models endpoint that returns the list of models available through your CoreValue account. This lets you use the standard OpenAI SDK's models.list() method to discover available models.
Authentication
The endpoint requires authentication. Provide your CoreValue API key as a Bearer token:
Authorization: Bearer $COVA_API_KEYRequests are IP rate-limited before authentication and org rate-limited after authentication succeeds.
Behavior
| Aspect | Detail |
|---|---|
| Format | OpenAI-compatible {"object": "list", "data": [...]} |
| Filtering | Server-side filter by requireExplicitRouting — models that require explicit routing are excluded. There is no client-side bypass. |
| Caching | In-memory cache for 60 seconds |
| Auth | Required (Bearer token or api-key header) |
The model list is filtered server-side based on requireExplicitRouting. Models flagged as requiring explicit routing are omitted from the response. This filtering cannot be bypassed by the client.
Example
cURL
curl https://gateway.corevalue.dev/v1/models \
-H "Authorization: Bearer $COVA_API_KEY"SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.COVA_API_KEY,
baseURL: "https://gateway.corevalue.dev/v1",
});
const models = await client.models.list();
for (const model of models.data) {
console.log(model.id);
}from openai import OpenAI
client = OpenAI(
api_key=os.environ["COVA_API_KEY"],
base_url="https://gateway.corevalue.dev/v1",
)
models = client.models.list()
for model in models.data:
print(model.id)Sample Response
{
"object": "list",
"data": [
{
"id": "gpt-4o",
"object": "model",
"created": 1715367049,
"owned_by": "openai"
},
{
"id": "groq/llama-3.1-70b-versatile",
"object": "model",
"created": 1715367049,
"owned_by": "groq"
}
]
}