openai

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
$30
Output / 1M tokens
$60
Benchmark

Pricing

Input tokens$30 per 1M tokens
Output tokens$60 per 1M tokens

Technical details

Model IDopenai/gpt-4
Context window8k tokens
Input modalitiestext, pdf
Output modalitiestext
TokenizerGPT
Max output tokens4,096

Use with MegaBrain

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!' }],
})

Ready to use OpenAI: GPT-4 ($$$$)?

Get an API key and start making requests in minutes.

Get an API key