OpenAI-Compatible API

AI APIs without the setup.

A fast, OpenAI SDK-compatible API gateway with streaming, simple integration, and persistent request logging.

POST /v1/chat/completions 200 OK
1
2
3
4
5
6
7
8
9
10
11
12
13
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
});
Base URL: https://freeapi.space/v1 logs.persisted=true
01Client
Your Application
OpenAI SDK
02Gateway
Free API
/v1/chat/completions
03Runtime
AI Model
gpt-4o

Built for developers who want less infrastructure.

OpenAI Compatible

Use the official OpenAI SDK with minimal changes.

Base URL → https://freeapi.space/v1

Streaming

Server-Sent Events for real-time token delivery.

stream: true

Persistent Logs

Requests and service status are persisted for debugging and auditing.

MongoDB

Already using OpenAI?
Change the base URL. That's it.

If you already use the OpenAI SDK, you already know how to use Free API.

Before
client.base_url = "https://api.openai.com/v1"
After
client.base_url = "https://freeapi.space/v1"

Interactive Playground

Test completions, inspect request metadata, and switch streaming on or off before wiring the endpoint into your app.

Open Playground →
Message
Response
Hello! How can I help you today?
EndpointPOST /v1/chat/completions
Status200 OK
Latency142ms

Technical details

API Interface
OpenAI SDK Compatible (V1)
Methods
POST, GET
Streaming
Server-Sent Events
Logging
MongoDB
Authentication
Bearer token
Transport
HTTPS