Seedream 5.0 Pro está no ar | Experimente no Gerador de Imagens →
openai
openai/gpt-4.1

openai/gpt-4.1

Data de lançamento: 2025-04-15

1,047,576 context · $2.00/M input tokens · $8.00/M output tokens

GPT-4.1 is a flagship large language model optimized for advanced instruction following, real-world software engineering, and long-context reasoning. It supports a 1 million token context window and outperforms GPT-4o and...

Preços

Pagamento por uso

Sem custo inicial, pague apenas pelo que usar

Entrada$2.00 / M Tokens
Saída$8.00 / M Tokens
Cache Read$0.50 / M Tokens

Experimentar o modelo

openai/gpt-4.1
Online
openai
Olá! Sou um assistente de IA útil. Em que posso ajudar?
Pronto para usar este modelo em um coding agent local?Setup do agente

Uso da API

Use os exemplos de código abaixo para integrar com nossa API:

import OpenAI from 'openai';

if (!process.env.WAVESPEED_API_KEY) throw new Error('Set WAVESPEED_API_KEY');
const client = new OpenAI({
  apiKey: process.env.WAVESPEED_API_KEY,
  baseURL: 'https://llm.wavespeed.ai/v1',
  timeout: 120_000,
  maxRetries: 2,
});

try {
  const response = await client.chat.completions.create({
    model: 'openai/gpt-4.1',
    messages: [{ role: 'user', content: 'Hello!' }],
  });
  console.log(response.choices[0]?.message?.content ?? '');
} catch (error) {
  console.error('LLM request failed:', error);
  process.exitCode = 1;
}

Introdução do modelo

Openai gpt-4.1

openai gpt-4.1


Why It Looks Great

  • Large Language Model architecture for efficient processing
  • 1047576 context window for long document handling
  • Competitive pricing at $2.2/$8.8 per million tokens

Key Features

  • Context Window: 1047576 tokens
  • Max Output: 32768 tokens
  • Vision: Supported
  • Function Calling: Supported

Specifications

SpecificationValue
ProviderOpenai
Model TypeLarge Language Model (LLM)
ArchitectureN/A
Context Window1047576 tokens
Max Output32768 tokens
InputText
OutputText
VisionSupported
Function CallingSupported

Pricing

Token TypeCost per Million Tokens
Input$2.2
Output$8.8

How to Use

  1. Write your prompt — describe the task, provide context, and specify desired output format.
  2. Submit — the model processes your request and returns the response.

API Integration

Base URL: https://llm.wavespeed.ai/v1 API Endpoint: chat/completions Model ID: openai/gpt-4.1


API Usage

Python SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.wavespeed.ai/v1"
)

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

print(response.choices[0].message.content)

cURL

curl https://llm.wavespeed.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "openai/gpt-4.1",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Notes

  • Model: openai/gpt-4.1
  • Provider: Openai

Info

Provedoropenai
Tipollm

Funcionalidades suportadas

Entrada
TextoImagem
Saída
Texto
Contexto1,047,576
Saída máx.32,768
Vision✓ Suportado
Function Calling✓ Suportado

Guia de acesso à API

Base URLhttps://llm.wavespeed.ai/v1
API Endpointchat/completions
ID do modeloopenai/gpt-4.1

GPT 4.1 API

openai/gpt-4.1

GPT-4.1 is a flagship large language model optimized for advanced instruction following, real-world software engineering, and long-context reasoning. It supports a 1 million token context window and outperforms GPT-4o and...

Entrada

$2 /M

Saída

$8 /M

Contexto

1048K

Saída máx.

33K

Vision

Suportado

Uso de ferramentas

Suportado

Experimente GPT 4.1 no WaveSpeedAI

Acesse GPT 4.1 através da nossa API unificada — compatível com OpenAI, sem inicializações a frio, preços transparentes.

Perguntas frequentes sobre GPT 4.1

Quanto custa GPT 4.1 via API?+

Preços no WaveSpeedAI: $2.00 por milhão de tokens de entrada e $8.00 por milhão de tokens de saída. Prompt caching e batch processing são cobrados separadamente e reduzem o custo efetivo em cargas longas e repetitivas.

Qual é a janela de contexto do GPT 4.1?+

GPT 4.1 suporta até 1048K tokens de contexto e até 33K tokens de saída por requisição.

GPT 4.1 é compatível com OpenAI?+

O WaveSpeedAI disponibiliza GPT 4.1 em https://llm.wavespeed.ai/v1 pela interface Chat Completions compatível com OpenAI. Na maioria dos clientes OpenAI SDK, basta alterar a base URL e a chave API; campos opcionais dependem do modelo.

Como começo a usar o GPT 4.1?+

Entre no WaveSpeedAI, crie uma chave API em Access Keys e envie uma requisição para https://llm.wavespeed.ai/v1/chat/completions com o model id mostrado acima. Consulte o catálogo atual para disponibilidade, recursos e preços.

APIs LLM relacionadas

GPT-4.1 | OpenAI 1M Context LLM API Pricing | WaveSpeedAI