chatgpt-image-latest
OpenAI
Offering state-of-the-art visual quality, precise instruction following, and support for large-scale batch processing.
$4.25/ M
$27.2/ M
$1.0625/ M
—
Stable code generation with predictable output.
Giá đầu vào
Thị trường: $2
/ M
Giá đầu ra
Thị trường: $8
/ M
Đọc cache
Thị trường: $0.5
/ M
Ghi cache
/ M
Đầu vào
Văn bản
Đầu ra
Văn bản
{
"model": "openai/gpt-4.1",
"messages": [
{
"role": "user",
"content": "Xin chào! Trước tiên hãy giới thiệu về bản thân, bao gồm năng lực chính và các tình huống phù hợp, kèm một ví dụ sử dụng ngắn."
}
],
"stream": false
}{}API
Mã sẵn sàng để gọi mô hình này qua API tương thích OpenAI của EasyAPI.
Tạo API token trong console và đặt làm biến môi trường:
Thay sk-xxxxxxxx bằng mã API từ console (Bearer Token).
Tạo API tokenexport EASYAPI_API_KEY=sk-xxxxxxxxDùng openai/gpt-4.1 với API EasyAPI:
curl https://token.easyapi.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EASYAPI_API_KEY" \
-d '{
"model": "openai/gpt-4.1",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'Thêm "stream": true vào body để nhận phản hồi qua SSE:
curl -N https://token.easyapi.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $EASYAPI_API_KEY" \
-d '{"model":"openai/gpt-4.1","messages":[{"role":"user","content":"Hello!"}],"stream":true}'Gửi yêu cầu chat completion. Hỗ trợ streaming và non-streaming.
https://token.easyapi.com/v1/chat/completionsBearer $EASYAPI_API_KEYapplication/jsonopenai/gpt-4.1Gửi yêu cầu chat completion, hỗ trợ cả phản hồi streaming và không streaming. Tài liệu
https://token.easyapi.com/v1/modelsBearer $EASYAPI_API_KEYLấy danh sách mô hình khả dụng cho tài khoản hiện tại. Tài liệu
| Tên | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
model | string | — | ID mô hình, ví dụ openai/gpt-4o hoặc anthropic/claude-3-5-sonnet |
messages | array | — | Danh sách tin nhắn hội thoại, mỗi mục gồm role và content |
stream | boolean | false | Khi đặt true, phản hồi được stream qua SSE |
temperature | float | 1 | Nhiệt độ lấy mẫu; càng cao càng ngẫu nhiên |
max_tokens | integer | — | Số token tối đa được tạo trong một phản hồi |
top_p | float | 1 | Nucleus sampling; giới hạn xác suất tích lũy của các token ứng viên |
frequency_penalty | float | 0 | Phạt tần suất; giảm lặp từ |
presence_penalty | float | 0 | Phạt hiện diện; khuyến khích chủ đề mới |
SDK chính thức OpenAI và khác hoạt động khi đổi base URL. Xem hướng dẫn tích hợp
OpenAI
Offering state-of-the-art visual quality, precise instruction following, and support for large-scale batch processing.
$4.25/ M
$27.2/ M
$1.0625/ M
—
OpenAI
Near GPT-4o performance at lower latency and cost, suited for high-frequency interactions, coding, and vision tasks.
$0.34/ M
$1.36/ M
$0.085/ M
$0/ M
OpenAI
Fastest GPT. Sub-second responses.
$0.085/ M
$0.34/ M
$0.0213/ M
$0/ M
OpenAI
Balanced general-purpose model covering dialogue, coding, and multilingual tasks at reasonable speed and cost for assistants and routine agent workflows.
$2.125/ M
$8.5/ M
$1.0625/ M
$0/ M