Model API

GPT-4o API

GPT-4o API on Aiduct. Input tokens: $2.50 / 1M input tokens. 128,000 token context. View model parameters, pricing and integration examples.

Model ID

gpt-4o

Provider

openai

Capability

chat, vision, tools, structured-output

Status

Available

Pricing and limits

Input tokens

$2.50 / 1M input tokens

Output tokens

$10.00 / 1M output tokens

Rates are in USD for the stated unit. Model options and additional usage can affect the final charge. Check the live catalog before integrating.

Context length
128,000
Max output
16,384
Release date
2024-05
Knowledge cutoff
2023-10

Use this model

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AIDUCT_API_KEY,
  baseURL: "https://api.aiduct.ai/v1",
});

const response = await client.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Say hello in one sentence." }],
});

Supported parameters

messagestemperaturetop_pmax_tokensstreamstoptoolstool_choiceresponse_formatuser