Felo API PlatformFelo API Platform

Guides

Protocols and SDKs

Use OpenAI-compatible, Responses, and Anthropic Messages protocols, including streaming, tool calls, and migration.

The Model API speaks three wire protocols. Keep your existing SDK and change the base URL, API key, and model ID.

Endpoint matrix

ProtocolEndpointTypical client
OpenAI Chat CompletionsPOST https://openapi.felo.ai/api/v1/chat/completionsOpenAI SDK, most OpenAI-compatible tools
OpenAI ResponsesPOST https://openapi.felo.ai/api/v1/responsesOpenAI SDK with Responses API features
Anthropic MessagesPOST https://openapi.felo.ai/api/v1/messagesAnthropic SDK, Claude Code, Claude-native tools

Base URLs

ClientBase URLWhy
OpenAI SDKhttps://openapi.felo.ai/api/v1The SDK appends /chat/completions or /responses
Anthropic SDKhttps://openapi.felo.ai/apiThe SDK appends /v1/messages; do not add /v1 yourself

Both clients use your Felo API key as the SDK API key.

import OpenAI from "openai";
import Anthropic from "@anthropic-ai/sdk";

const openai = new OpenAI({
  apiKey: process.env.FELO_API_KEY,
  baseURL: "https://openapi.felo.ai/api/v1",
});

const anthropic = new Anthropic({
  apiKey: process.env.FELO_API_KEY,
  baseURL: "https://openapi.felo.ai/api",
});

Choose a protocol

  • Use Chat Completions when your tool or SDK expects the familiar messages array and choices[0].message.content.
  • Use Responses when you need OpenAI's Responses object, input, instructions, or output_text.
  • Use Messages when you are using an Anthropic SDK or a Claude-native tool.

Check the model before assuming every protocol works. The catalog exposes supported_protocols, supported_parameters, and a recommended_protocol. recommended_protocol is a client recommendation, not a restriction; a model may still accept another protocol.

Streaming

Set stream: true to receive Server-Sent Events.

  • Chat Completions emits OpenAI-style chat chunks.
  • Responses emits Responses SSE events and ends with a completed response object.
  • Messages emits Anthropic message stream events.

Read the event stream incrementally and handle the terminal event before closing the connection. A dropped connection is not the same as a completed response.

Tool calls and structured output

Pass tools in the protocol's native shape. Support varies by model, so check supported_parameters in the catalog before relying on tool calls, JSON mode, or structured output. A model can accept the field and still ignore an unsupported option.

Channel routing

All three endpoints accept X-Felo-Channel when you need to pin a provider. See Channels and Provider Routing for the header rules and examples.

Migrate from an official API

  1. Change the base URL to the matching Felo URL.
  2. Replace the API key with FELO_API_KEY.
  3. Replace the model name with the public Felo model ID.
  4. Keep the rest of the request shape.
SymptomLikely cause
404 on every requestBase URL already includes /v1, or the Anthropic base URL has /v1 added manually
401The Felo key is missing or the client is still sending the old key
400 model errorThe model ID is not public or does not support the chosen endpoint
Messages request rejectedmax_tokens is required by the Messages protocol
Tool call ignoredThe model does not advertise that capability