OpenAI-compatible · No auth required

One API.
Many models.

Access multiple AI models through a single consistent endpoint. Compatible with any OpenAI client library — no key, no setup.

— Models
/v1/ OpenAI route
SSE Streaming

Models

Call GET /v1/models to retrieve a live list with metadata. Most of these are free/scraped upstreams and can go down without notice — run a live check to see what's actually working right now.

Loading…

API Documentation

All endpoints speak JSON. The /v1/ routes are OpenAI-compatible — drop in any client library without changes.

POST /v1/chat/completions

Send a list of messages and receive a completion. Supports blocking and streaming modes.

Request body
JSON
{
  "model": "gpt-4o",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user",   "content": "Hello, can you help me?" }
  ],
  "max_tokens": 1024
}
Response
JSON
{
  "id": "chatcmpl-1718000000000",
  "object": "chat.completion",
  "created": 1718000000,
  "model": "gpt-4o",
  "choices": [{
    "index": 0,
    "message": { "role": "assistant", "content": "Of course! What do you need?" },
    "finish_reason": "stop"
  }],
  "usage": { "prompt_tokens": 20, "completion_tokens": 9, "total_tokens": 29 }
}
Tool use (optional · Survo models)

Add "use_tool": true and the model may call its built-in tools (e.g. live weather). They run server-side, so you just get the final answer — no follow-up call needed. Off by default; other models ignore it. Executed calls are listed in x_tool_calls; when streaming, they arrive as x_tool events.

JSON
// request
{ "model": "gemini-3.8-flash", "use_tool": true,
  "messages": [{ "role": "user", "content": "What's the weather in Harare right now?" }] }

// response (finish_reason is always "stop")
{
  "choices": [{ "message": { "role": "assistant", "content": "It's 21.1°C in Harare…" }, "finish_reason": "stop" }],
  "x_tool_calls": [{
    "id": "call_3032623", "type": "function", "status": "completed",
    "function": { "name": "get_weather", "arguments": "{\"city\":\"Harare\"}" },
    "output": { "current": { "temperature_2m": 21.1 } }
  }]
}
POST /v1/chat/completions · stream: true

Add "stream": true to receive a server-sent events stream. Each event carries a delta.content fragment. Ends with data: [DONE].

SSE stream
text/event-stream
data: {"choices":[{"delta":{"role":"assistant"},"finish_reason":null}]}

data: {"choices":[{"delta":{"content":"Hey! "},"finish_reason":null}]}

data: {"choices":[{"delta":{"content":"How can I help?"},"finish_reason":null}]}

data: {"choices":[{"delta":{},"finish_reason":"stop"}]}

data: [DONE]
Reading the stream (JS)
JavaScript
const res = await fetch('https://grey-api.vercel.app/v1/chat/completions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Hello!' }], stream: true })
});

const reader = res.body.getReader();
const decoder = new TextDecoder();
let buf = '';

while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  buf += decoder.decode(value, { stream: true });
  const lines = buf.split('\n');
  buf = lines.pop();
  for (const line of lines) {
    if (!line.startsWith('data:')) continue;
    const payload = line.slice(5).trim();
    if (!payload || payload === '[DONE]') continue;
    const chunk = JSON.parse(payload);
    const text = chunk.choices?.[0]?.delta?.content;
    if (text) process.stdout.write(text);
  }
}
GET /v1/models

Returns all enabled models and their metadata in the OpenAI models list format.

POST /api/chat

Original endpoint — fully supported alongside the v1 routes.

Request body
JSON
{
  "model": "gpt-4o",
  "messages": [
    { "role": "system", "content": "You are a helpful assistant." },
    { "role": "user",   "content": "Hello, can you help me?" }
  ],
  "options": { "max_tokens": 2000 }
}
Response
JSON
{
  "model": "gpt-4o",
  "response": "Of course! What do you need?",
  "response_type": "text",
  "usage": { "prompt_tokens": 20, "completion_tokens": 9, "total_tokens": 29 }
}

Playground

Requests go directly to the live API.

Simple
Advanced
JSON Editor
Stream response

Code Examples

Swap in your deployment URL where needed.

JavaScript
OpenAI SDK
Python
cURL
Java
JavaScript / Node.js
const res = await fetch('https://grey-api.vercel.app/v1/chat/completions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    model: 'gpt-4o',
    messages: [
      { role: 'system', content: 'You are a helpful assistant.' },
      { role: 'user',   content: 'Hello, how are you?' }
    ]
  })
});
const data = await res.json();
console.log(data.choices[0].message.content);
© 2026 Grey API