curl --request POST \
--url 'https://api.elkapi.com/v1/responses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": false
}'
import requests
url = "https://api.elkapi.com/v1/responses"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": False
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/responses";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": false
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"id": "id",
"object": "response",
"created_at": 1,
"status": "completed",
"model": "gpt-5.5",
"output": [
{
"type": "type",
"id": "id",
"status": "status",
"role": "user",
"content": "こんにちは、自己紹介してください"
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"text_tokens": 1,
"audio_tokens": 1,
"image_tokens": 1
},
"completion_tokens_details": {
"text_tokens": 1,
"audio_tokens": 1,
"reasoning_tokens": 1
}
}
}
ネイティブ OpenAI 形式
Responses
- モデル応答を作成するための OpenAI Responses API です。
- 複数ターンの会話、ツール呼び出し、推論などに対応します。
POST
/
v1
/
responses
curl --request POST \
--url 'https://api.elkapi.com/v1/responses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": false
}'
import requests
url = "https://api.elkapi.com/v1/responses"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": False
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/responses";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": false
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"id": "id",
"object": "response",
"created_at": 1,
"status": "completed",
"model": "gpt-5.5",
"output": [
{
"type": "type",
"id": "id",
"status": "status",
"role": "user",
"content": "こんにちは、自己紹介してください"
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"text_tokens": 1,
"audio_tokens": 1,
"image_tokens": 1
},
"completion_tokens_details": {
"text_tokens": 1,
"audio_tokens": 1,
"reasoning_tokens": 1
}
}
}
curl --request POST \
--url 'https://api.elkapi.com/v1/responses' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": false
}'
import requests
url = "https://api.elkapi.com/v1/responses"
headers = {
"Authorization": "Bearer <token>"
}
headers["Content-Type"] = "application/json"
payload = {
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": False
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json())
const url = "https://api.elkapi.com/v1/responses";
const headers = {
"Authorization": "Bearer <token>"
};
headers["Content-Type"] = "application/json";
const payload = {
"model": "gpt-5.5",
"input": "今日は天気がよく、散歩にぴったりです。",
"temperature": 1,
"stream": false
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(payload)
});
console.log(await response.json());
{
"id": "id",
"object": "response",
"created_at": 1,
"status": "completed",
"model": "gpt-5.5",
"output": [
{
"type": "type",
"id": "id",
"status": "status",
"role": "user",
"content": "こんにちは、自己紹介してください"
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1,
"prompt_tokens_details": {
"cached_tokens": 1,
"text_tokens": 1,
"audio_tokens": 1,
"image_tokens": 1
},
"completion_tokens_details": {
"text_tokens": 1,
"audio_tokens": 1,
"reasoning_tokens": 1
}
}
}
Authorizations
string
必須
すべてのエンドポイントで Bearer Token 認証が必要です。リクエストヘッダーに追加します:
Authorization: Bearer YOUR_API_KEY
Body
string
デフォルト:"gpt-5.5"
必須
例:
gpt-5.5string or array<object>
入力内容。文字列またはメッセージ配列を指定できます
string
integer
number
number
boolean
array<object>
string or object
string
string
指定可能な値:
auto、disabledResponse
string
string
例:
responseinteger
string
指定可能な値:
completed、failed、in_progress、incompletestring
デフォルト:"gpt-5.5"
例:
gpt-5.5⌘I