OpenAI

GPT-4

openai/gpt-4

OpenAI's flagship model, GPT-4 is a large-scale multimodal language model capable of solving difficult problems with greater accuracy than previous models due to its broader general knowledge and advanced reasoning...

Context
8K tokens
Input, 1M tokens
$35
Output, 1M tokens
$69
Benchmark
—

Uptime and speed

Loading…

Pricing

Charged from your prepaid balance for the tokens actually used.

Input tokens$35 per 1M tokens
Output tokens$69 per 1M tokens

Apps and activity

Loading…

Technical details

Model IDopenai/gpt-4
Context window8K tokens
AcceptsText, pdf
ProducesText
TokenizerGPT
Max output tokens4,096

How to connect

The API is OpenAI-compatible: the official SDKs, LangChain and any client with a "base URL" field work.

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'https://getmegabrain.com/api/gateway/v1',
  apiKey: process.env.MEGABRAIN_API_KEY,
})

const response = await client.chat.completions.create({
  model: 'openai/gpt-4',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Start using GPT-4

Create a free account, get a key in your dashboard and send your first request. Top up your balance when you need it.