LLM API
LLM API
Call Felo model endpoints through OpenAI-compatible and Anthropic-compatible protocols.
/api/v1/modelsAuthentication
Bearer API key or X-API-Key
Content type
application/json
Rate notes
Model service limits may apply. Retry with backoff on 429 or 503.
The LLM API exposes direct model calling endpoints through Felo API Platform. Use it when you want to call general-purpose language models, reuse OpenAI-compatible or Anthropic-compatible clients, or connect agent frameworks to Felo API Platform.
The LLM API currently includes three model calling surfaces:
POST /api/v1/responses: OpenAI Responses compatiblePOST /api/v1/chat/completions: OpenAI Chat Completions compatiblePOST /api/v1/messages: Anthropic Messages compatible
Authentication
LLM API requests require a Felo API Platform key. Use either Authorization: Bearer ... or X-API-Key.
Authorization: Bearer YOUR_API_KEYX-API-Key: YOUR_API_KEYSee the Authentication Guide for details on creating and managing API keys.
Base URL
Use the public Felo API Platform host:
https://openapi.felo.aiFor SDK clients, configure the protocol-specific base URL shown in Basic Usage.
Common Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes, unless X-API-Key is used | API key in the format Bearer YOUR_API_KEY |
X-API-Key | Yes, unless Authorization is used | API key alternative to the Bearer header |
Content-Type | Yes | Must be application/json |
X-Request-Id | No | Optional request ID for troubleshooting |
Model Discovery
Use the Models endpoint to list public model IDs available through Felo API Platform:
GET https://openapi.felo.ai/api/v1/modelsThe response follows the OpenAI-compatible models list shape and returns public model metadata. It does not expose routing controls or internal route details. Use the model IDs below in the model field of Responses, Chat Completions, and Messages requests.
Models and Pricing
Requests use Felo API Platform's default model route. Do not send routing parameters in application requests.
Prices are listed in USD. Token rates are shown per 1 million tokens for readability; billing uses the per-token precision from the current price snapshot. Cache rates apply only when the protocol response includes cache usage. A dash means no separate published rate or published limit. Web search usage, when reported by the model service, is charged at $0.01 per search.
| Model ID | Context | Max output | Input / 1M tokens | Output / 1M tokens | Cache read / 1M tokens | Cache write / 1M tokens |
|---|---|---|---|---|---|---|
claude-haiku-4-5 | 200K | 64K | $1.00 | $5.00 | $0.10 | $1.25 |
claude-sonnet-4-6 | 1M | 128K | $3.00 | $15.00 | $0.30 | $3.75 |
claude-opus-4-8 | 1M | 128K | $5.00 | $25.00 | $0.50 | $6.25 |
claude-sonnet-5 | 1M | 128K | $2.00 | $10.00 | $0.20 | $2.50 |
gpt-5.5 | 1.05M | 128K | $5.00 | $30.00 | $0.50 | - |
gpt-5.5-pro | 1.05M | 128K | $30.00 | $180.00 | - | - |
gpt-5.6-luna | 1.05M | 128K | $1.00 | $6.00 | $0.10 | $1.25 |
gpt-5.6-terra | 1.05M | 128K | $2.50 | $15.00 | $0.25 | $3.125 |
gpt-5.6-sol | 1.05M | 128K | $5.00 | $30.00 | $0.50 | $6.25 |
grok-4.5 | 500K | - | $2.00 | $6.00 | $0.50 | - |
deepseek-v4-flash | 1M | 384K | $0.09 | $0.18 | $0.018 | - |
GPT-5.6 is available in three tiers: Luna for fast, cost-efficient workloads; Terra for balanced coding, reasoning, and agentic tasks; and Sol for flagship complex reasoning and coding. Each tier also exposes a -pro model ID (gpt-5.6-luna-pro, gpt-5.6-terra-pro, and gpt-5.6-sol-pro) that uses the same underlying model with pro reasoning mode. Pricing, context length, and maximum output are unchanged for the -pro IDs.
DeepSeek V4 Flash supports reasoning and non-reasoning modes, JSON output, tool calls, Responses API, and Anthropic API compatibility. It is available through Felo's Responses, Chat Completions, and Messages surfaces. Cache write pricing is not yet published.
Basic Usage
These examples use the official OpenAI and Anthropic SDKs. Set FELO_API_KEY to your Felo API Platform key before running the examples.
export FELO_API_KEY="YOUR_API_KEY"Install SDKs
OpenAI SDK
Use the OpenAI SDK for the Responses API and Chat Completions API.
##### JavaScript
npm install openai##### Python
pip install openaiAnthropic SDK
Use the Anthropic SDK for the Messages API.
##### JavaScript
npm install @anthropic-ai/sdk##### Python
pip install anthropicConfigure Clients
OpenAI-compatible endpoints use the OpenAI SDK base URL with /api/v1, because the SDK appends resource paths such as /responses and /chat/completions.
JavaScript
import OpenAI from "openai";
const openai = new OpenAI({
apiKey: process.env.FELO_API_KEY,
baseURL: "https://openapi.felo.ai/api/v1",
});Python
import os
from openai import OpenAI
openai = OpenAI(
api_key=os.environ.get("FELO_API_KEY"),
base_url="https://openapi.felo.ai/api/v1",
)Anthropic-compatible endpoints use the Anthropic SDK base URL without /v1, because the SDK appends /v1/messages.
JavaScript
import Anthropic from "@anthropic-ai/sdk";
const anthropic = new Anthropic({
apiKey: process.env.FELO_API_KEY,
baseURL: "https://openapi.felo.ai/api",
});Python
import os
from anthropic import Anthropic
anthropic = Anthropic(
api_key=os.environ.get("FELO_API_KEY"),
base_url="https://openapi.felo.ai/api",
)Using the Responses API
Use the Responses API for new OpenAI-compatible integrations and agent-style response objects.
JavaScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.FELO_API_KEY,
baseURL: "https://openapi.felo.ai/api/v1",
});
const response = await client.responses.create({
model: "gpt-5.6-sol",
input: "Write a one-sentence bedtime story about a unicorn.",
});
console.log(response.output_text);Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("FELO_API_KEY"),
base_url="https://openapi.felo.ai/api/v1",
)
response = client.responses.create(
model="gpt-5.6-sol",
input="Write a one-sentence bedtime story about a unicorn.",
)
print(response.output_text)Using Chat Completions
Use Chat Completions when your application already sends OpenAI-style messages.
JavaScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.FELO_API_KEY,
baseURL: "https://openapi.felo.ai/api/v1",
});
const completion = await client.chat.completions.create({
model: "gpt-5.6-sol",
messages: [
{
role: "user",
content: "Give me one sentence about why API compatibility matters.",
},
],
});
console.log(completion.choices[0].message.content);Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("FELO_API_KEY"),
base_url="https://openapi.felo.ai/api/v1",
)
completion = client.chat.completions.create(
model="gpt-5.6-sol",
messages=[
{
"role": "user",
"content": "Give me one sentence about why API compatibility matters.",
}
],
)
print(completion.choices[0].message.content)Using Messages
Use Messages when your client or agent framework expects Anthropic-compatible request and response shapes.
JavaScript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.FELO_API_KEY,
baseURL: "https://openapi.felo.ai/api",
});
const message = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 128,
messages: [
{
role: "user",
content: "Summarize the value of direct model APIs in one sentence.",
},
],
});
const text = message.content
.filter((block) => block.type === "text")
.map((block) => block.text)
.join("");
console.log(text);Python
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get("FELO_API_KEY"),
base_url="https://openapi.felo.ai/api",
)
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=128,
messages=[
{
"role": "user",
"content": "Summarize the value of direct model APIs in one sentence.",
}
],
)
text = "".join(block.text for block in message.content if block.type == "text")
print(text)Official Documentation
- OpenAI API Quickstart
- OpenAI Create response
- OpenAI Create chat completion
- Claude Messages API
- Anthropic TypeScript SDK
- Anthropic Python SDK
For agent client setup, see Claude Code and Codex Configuration.
Protocol Reference
Responses
Use this endpoint for OpenAI Responses API compatible clients and integrations.
Endpoint
POST https://openapi.felo.ai/api/v1/responsesRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Public Felo model ID |
input | string or array | Yes | User input, multi-turn input, or multimodal input |
instructions | string | No | System or developer instructions |
stream | boolean | No | Whether to use Server-Sent Events streaming |
temperature | number | No | Sampling temperature |
max_output_tokens | integer | No | Maximum output tokens |
SDK Request
const response = await client.responses.create({
model: "gpt-5.6-sol",
input: "Reply with exactly: responses ok",
});
console.log(response.output_text);Response Text Path
output_textChat Completions
Use this endpoint for OpenAI Chat Completions compatible clients and SDKs.
Endpoint
POST https://openapi.felo.ai/api/v1/chat/completionsRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Public Felo model ID |
messages | array | Yes | Conversation messages |
messages[].role | string | Yes | system, user, or assistant |
messages[].content | string | Yes | Message content |
stream | boolean | No | Whether to use Server-Sent Events streaming |
temperature | number | No | Sampling temperature |
max_tokens | integer | No | Maximum output tokens |
SDK Request
const completion = await client.chat.completions.create({
model: "gpt-5.6-sol",
messages: [
{
role: "user",
content: "Reply with exactly: chat completions ok",
},
],
});
console.log(completion.choices[0].message.content);Response Text Path
choices[0].message.contentMessages
Use this endpoint for Anthropic Messages compatible clients and SDKs.
Endpoint
POST https://openapi.felo.ai/api/v1/messagesRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Public Felo model ID |
max_tokens | integer | Yes | Maximum output tokens |
messages | array | Yes | Conversation messages |
messages[].role | string | Yes | user or assistant |
messages[].content | string or array | Yes | Plain text or Anthropic content blocks |
system | string | No | System prompt |
stream | boolean | No | Whether to use Server-Sent Events streaming |
temperature | number | No | Sampling temperature |
SDK Request
const message = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 64,
messages: [
{
role: "user",
content: "Reply with exactly: messages ok",
},
],
});
const text = message.content
.filter((block) => block.type === "text")
.map((block) => block.text)
.join("");
console.log(text);Content Block Request
const message = await client.messages.create({
model: "claude-sonnet-4-6",
max_tokens: 64,
messages: [
{
role: "user",
content: [
{
type: "text",
text: "Reply with exactly: messages ok",
},
],
},
],
});Response Text Path
content[].textStreaming
Set stream to true to receive Server-Sent Events. The event payload format follows the selected protocol:
- Responses streams return Responses-compatible response events.
- Chat Completions streams return OpenAI-compatible chat completion chunks.
- Messages streams return Anthropic-compatible message events.
const stream = await client.responses.create({
model: "gpt-5.6-sol",
input: "Write one sentence.",
stream: true,
});Clients should parse the stream according to the protocol they are using rather than expecting one shared event schema across all three endpoints.
Errors
The LLM API returns the error shape of the selected protocol whenever possible. Common causes include:
| HTTP Status | Cause | Suggested Action |
|---|---|---|
400 | Invalid JSON body or missing required protocol fields | Check model, messages, input, max_tokens, and content block fields |
401 | Missing or invalid API key | Verify Authorization: Bearer ... or X-API-Key |
402 | Insufficient account credits | Check your Felo account balance |
429 | Rate limit exceeded | Slow down requests and retry later |
502 | Model service request failed | Retry and provide X-Request-Id when contacting support |
503 | Model service temporarily unavailable | Retry with backoff or choose another published model |