YepAPI
AI Models

Chat Completions

Unified endpoint for 70+ LLM models. OpenAI-compatible drop-in replacement — just change the base URL.

POST/v1/ai/chat/completions
$0.01/call

Overview

A single endpoint that gives you access to 70+ LLM models from OpenAI, Anthropic, Google, Meta, DeepSeek, xAI, Qwen, Mistral, Perplexity, and more. Fully OpenAI-compatible — swap the base URL and it works with any OpenAI SDK.

There are two ways to call the AI API:

EndpointFormatModel Source
POST /v1/ai/chat/completionsOpenAI-compatible (snake_case)model field in body
POST /v1/ai/chatYepAPI simplified (camelCase)model field in body

Both hit the same infrastructure. Pick whichever fits your stack.

OpenAI SDK Drop-In

Point any OpenAI SDK at YepAPI by changing the base URL:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_API_KEY",
  baseURL: "https://api.yepapi.com/v1/ai",
});

const response = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-4.6",
  messages: [{ role: "user", content: "Explain quantum computing in one paragraph." }],
});

console.log(response.choices[0].message.content);

Works with Python, Node, Go, or any language with an OpenAI-compatible client.

Usage

OpenAI-Compatible Endpoint

const res = await fetch("https://api.yepapi.com/v1/ai/chat/completions", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "anthropic/claude-sonnet-4.6",
    messages: [{ role: "user", content: "What is the capital of France?" }],
    temperature: 0.7,
    max_tokens: 1024,
  }),
});
const data = await res.json();
console.log(data.choices[0].message.content);
curl -X POST https://api.yepapi.com/v1/ai/chat/completions \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4.6",
    "messages": [{"role": "user", "content": "What is the capital of France?"}],
    "temperature": 0.7,
    "max_tokens": 1024
  }'

YepAPI Simplified Endpoint

const res = await fetch("https://api.yepapi.com/v1/ai/chat", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "claude-sonnet-4.6",
    messages: [{ role: "user", content: "What is the capital of France?" }],
    temperature: 0.7,
    maxTokens: 1024,
  }),
});
const { data } = await res.json();
console.log(data.message.content);
Info

The /v1/ai/chat endpoint accepts short aliases like gpt-4o, claude-sonnet, or gemini-flash — no need for the full provider/model format.

Request Body

/v1/ai/chat/completions (OpenAI-compatible, snake_case)

ParameterTypeRequiredDescriptionDefault
modelstringYesModel ID (e.g. openai/gpt-4o, anthropic/claude-sonnet-4.6)
messagesMessage[]YesArray of { role, content } objects
max_tokensnumberNoMaximum tokens in the responseModel default
temperaturenumberNoSampling temperature (0.0–2.0)1.0
top_pnumberNoNucleus sampling threshold1.0
frequency_penaltynumberNoPenalize repeated tokens0
presence_penaltynumberNoPenalize tokens already present0
stopstring | string[]NoStop sequences
streambooleanNoEnable SSE streamingfalse

/v1/ai/chat (YepAPI simplified, camelCase)

ParameterTypeRequiredDescriptionDefault
modelstringNoModel ID or alias (e.g. gpt-4o, claude-sonnet)openai/gpt-4o-mini
messagesMessage[]YesArray of { role, content } objects
maxTokensnumberNoMaximum tokens in the responseModel default
temperaturenumberNoSampling temperature (0.0–2.0)1.0
topPnumberNoNucleus sampling threshold1.0
frequencyPenaltynumberNoPenalize repeated tokens0
presencePenaltynumberNoPenalize tokens already present0
stopstring | string[]NoStop sequences
streambooleanNoEnable SSE streamingfalse

Model Aliases

The /v1/ai/chat endpoint accepts short aliases so you don't need the full provider/model format:

AliasResolves To
gpt-4oopenai/gpt-4o
gpt-4o-miniopenai/gpt-4o-mini
gpt-5.4openai/gpt-5.4
claude-opusanthropic/claude-opus-4.6
claude-sonnetanthropic/claude-sonnet-4.6
claude-haikuanthropic/claude-haiku-4
gemini-progoogle/gemini-2.5-pro
gemini-flashgoogle/gemini-2.5-flash
grokx-ai/grok-4.20
deepseek-v3deepseek/deepseek-chat-v3
deepseek-r1deepseek/deepseek-r1
sonar-properplexity/sonar-pro
llama-scoutmeta-llama/llama-4-scout
qwenqwen/qwen3.6-plus
mistral-smallmistralai/mistral-small-2603

You can also pass the full provider/model format to either endpoint.

Response Formats

/v1/ai/chat/completions (OpenAI-compatible)

{
  "id": "chatcmpl-abc123",
  "object": "text_completion",
  "created": 1713100000,
  "model": "anthropic/claude-sonnet-4.6",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The capital of France is Paris."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 8,
    "total_tokens": 22
  }
}

/v1/ai/chat (YepAPI simplified)

{
  "ok": true,
  "data": {
    "id": "chatcmpl-abc123",
    "model": "anthropic/claude-sonnet-4.6",
    "message": {
      "role": "assistant",
      "content": "The capital of France is Paris."
    },
    "usage": {
      "promptTokens": 14,
      "completionTokens": 8,
      "totalTokens": 22
    },
    "costUsd": 0.000162
  }
}

Streaming

Set "stream": true to receive Server-Sent Events.

/v1/ai/chat/completions (OpenAI-compatible SSE)

data: {"id":"chatcmpl-abc123","model":"anthropic/claude-sonnet-4.6","choices":[{"index":0,"delta":{"role":"assistant","content":"The"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","model":"anthropic/claude-sonnet-4.6","choices":[{"index":0,"delta":{"content":" capital"},"finish_reason":null}]}
data: [DONE]

/v1/ai/chat (YepAPI simplified SSE)

data: {"id":"chatcmpl-abc123","delta":{"role":"assistant","content":"The"},"model":"anthropic/claude-sonnet-4.6","index":0}
data: {"id":"chatcmpl-abc123","delta":{"content":" capital"},"model":"anthropic/claude-sonnet-4.6","index":0}
data: [DONE]

List Available Models

curl https://api.yepapi.com/v1/ai/models

Returns every available model with pricing, context window, and capabilities. This endpoint is free and does not require authentication.

Under the Hood

We handle auth, billing, and response normalization — you just send messages.

On this page