TokenRoute
Get started
Back to models

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...

Pricing

Input$21.00 /M
Output$42.00 /M

Specs

Context length8.2K tokens
Max output4.1K tokens
Inputtext
Outputtext

Quickstart

Point the OpenAI SDK at https://tokenroute.app/api/v1 and use a TokenRoute API key.

bash
curl https://tokenroute.app/api/v1/chat/completions \
  -H "Authorization: Bearer $TOKENROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'

Supported parameters

frequency_penalty
logit_bias
logprobs
max_completion_tokens
max_tokens
presence_penalty
response_format
seed
stop
structured_outputs
temperature
tool_choice
tools
top_logprobs
top_p