OpenAI Compatible
Use the official OpenAI SDK with minimal changes.
Base URL → https://freeapi.space/v1OpenAI-Compatible API
A fast, OpenAI SDK-compatible API gateway with streaming, simple integration, and persistent request logging.
curl "https://freeapi.space/v1/chat/completions" \ -H "Authorization: Bearer any-key-works" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "messages": [ { "role": "user", "content": "Hello!" } ], "stream": false }'
from openai import OpenAI client = OpenAI( base_url="https://freeapi.space/v1", api_key="any-key-works" ) response = client.chat.completions.create( model="gpt-4o", messages=[{ "role": "user", "content": "Hello!" }], stream=False )
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://freeapi.space/v1", apiKey: "any-key-works" }); const response = await client.chat.completions.create({ model: "gpt-4o", messages: [{ role: "user", content: "Hello!" }], stream: false });
Developer flow
Use the official OpenAI SDK with minimal changes.
Base URL → https://freeapi.space/v1Server-Sent Events for real-time token delivery.
stream: trueRequests and service status are persisted for debugging and auditing.
MongoDBIf you already use the OpenAI SDK, you already know how to use Free API.
Test completions, inspect request metadata, and switch streaming on or off before wiring the endpoint into your app.
Open Playground →