endpoint 구성
2개의 공개 endpoint를 제공합니다: chat_completion, response.
curl -X POST https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요."
}
]
}'
import { GptClient } from "@runapi.ai/gpt";
const client = new GptClient();
const result = await client.chatCompletion.run({
model: "gpt-4o-mini",
messages: [{"role":"user","content":"이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요."}],
});
import os
import requests
response = requests.post(
"https://runapi.ai/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['RUNAPI_API_KEY']}"},
json={"model":"gpt-4o-mini","messages":[{"role":"user","content":"이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요."}]}
)
response.raise_for_status()
<?php
$client = curl_init("https://runapi.ai/v1/chat/completions");
curl_setopt_array($client, [
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("RUNAPI_API_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gpt-4o-mini',
'messages' => [['role' => 'user', 'content' => '이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요.']],
])
]);
$response = curl_exec($client);
RunApi client = new RunApi(System.getenv("RUNAPI_API_KEY"));
Task task = client.chatCompletion().run({"model":"gpt-4o-mini","messages":[{"role":"user","content":"이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요."}]});
task.waitForResult();
require "runapi/gpt"
client = RunApi::Gpt::Client.new
result = client.chat_completion.run(
model: "gpt-4o-mini",
messages: [{role: "user", content: "이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요."}]
)
client := runapi.NewClient(os.Getenv("RUNAPI_API_KEY"))
task, err := client.chatCompletion.Run({"model":"gpt-4o-mini","messages":[{"role":"user","content":"이 분기별 수익 데이터를 분석하고 주요 트렌드, 이상 현상, 세 가지 권고 사항이 포함된 요약을 작성해 주세요."}]})
if err != nil { log.Fatal(err) }
task.Wait()
$ runapi generate \
--model gpt-4o-mini \
--endpoint chat_completion \
--wait
사용 가능한 버전 17개
원하는 모델을 선택하고 몇 초 만에 생성해보세요.
| 제공자 | OpenAI |
| 모델 ID | gpt-4o-mini |
| 모달리티 | Text |
| 작업 유형 | Synchronous |
| API 엔드포인트 | /v1/chat/completions |
| /v1/responses |
| /v1/messages | |
| /v1beta/models/gpt-4o-mini:generateContent | |
| /v1beta/models/gpt-4o-mini:streamGenerateContent | |
| 청구 단위 | 1K tokens |
| 카탈로그 상태 | 운영 중 |
무료로 가입하고 대시보드에서 gpt-4o-mini용 API 키를 만드세요.
/v1/chat/completions로 gpt-4o-mini 모델 ID와 매개변수를 포함한 POST 요청을 보내세요.
엔드포인트에서 완료된 gpt-4o-mini 응답을 직접 읽으세요.
2개의 공개 endpoint를 제공합니다: chat_completion, response.
1K tokens 기준으로 측정되며 구독 없이 이용 가능합니다.
이 엔드포인트에 게시된 요청 매개변수가 없습니다.
LLM을 채팅과 추론에 사용합니다.
구현 작업을 생성하고 리뷰합니다.
모델을 backend 작업에 연결합니다.
이 모델에 대한 검증된 고객 피드백이 아직 없습니다.
quickstart에 표시된 모델 ID를 전달하세요.
네. 호출 또는 단위 기준으로 측정됩니다.