Grok 빠른 응답 (전체 모델)
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-4.7",
"input": "Explain what makes Grok 4.5 different in two sentences."
}
'import requests
url = "https://direct.evolink.ai/v1/responses"
payload = {
"model": "grok-4.7",
"input": "Explain what makes Grok 4.5 different in two sentences."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'grok-4.7',
input: 'Explain what makes Grok 4.5 different in two sentences.'
})
};
fetch('https://direct.evolink.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'grok-4.7',
'input' => 'Explain what makes Grok 4.5 different in two sentences.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"grok-4.7\",\n \"input\": \"Explain what makes Grok 4.5 different in two sentences.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"grok-4.7\",\n \"input\": \"Explain what makes Grok 4.5 different in two sentences.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"grok-4.7\",\n \"input\": \"Explain what makes Grok 4.5 different in two sentences.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "55d44212-8d5e-90cc-975f-36d341ce21f5",
"object": "response",
"status": "completed",
"model": "grok-4.7",
"created_at": 1786538000,
"output": [
{
"id": "<string>",
"type": "message",
"status": "completed",
"content": [
{}
],
"encrypted_content": "<string>"
}
],
"usage": {
"input_tokens": 1692,
"output_tokens": 54,
"total_tokens": 1746,
"input_tokens_details": {
"cached_tokens": 512
},
"output_tokens_details": {
"reasoning_tokens": 35
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}Responses API
Grok 전체 모델 인터페이스 - Responses 빠른 시작
- OpenAI Responses API 형식으로 xAI Grok 텍스트 모델 호출 (모델은
model매개변수로 선택) - 추론 + 도구 호출 모델. 컨텍스트 윈도우는 500K 토큰
- xAI 서버 측 도구는 xAI 인프라에서 실행됩니다:
web_search,x_search,code_execution,attachment_search,collections_search. X Search는 가져온 게시물과 사용자 프로필 수로 과금하며, 다른 도구는 성공한 호출당 과금합니다. - 도구와 전체 매개변수가 필요하신가요? 전체 매개변수 문서를 참조하세요
- xAI 공식 명세에 따르면
grok-4.7은 기본적으로encrypted_content가 포함된reasoning항목을 반환합니다. 실제 반환 필드는 현재 사용 중인 경로의 응답을 확인하세요.
POST
/
v1
/
responses
Grok 빠른 응답 (전체 모델)
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-4.7",
"input": "Explain what makes Grok 4.5 different in two sentences."
}
'import requests
url = "https://direct.evolink.ai/v1/responses"
payload = {
"model": "grok-4.7",
"input": "Explain what makes Grok 4.5 different in two sentences."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'grok-4.7',
input: 'Explain what makes Grok 4.5 different in two sentences.'
})
};
fetch('https://direct.evolink.ai/v1/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://direct.evolink.ai/v1/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'grok-4.7',
'input' => 'Explain what makes Grok 4.5 different in two sentences.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://direct.evolink.ai/v1/responses"
payload := strings.NewReader("{\n \"model\": \"grok-4.7\",\n \"input\": \"Explain what makes Grok 4.5 different in two sentences.\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://direct.evolink.ai/v1/responses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"grok-4.7\",\n \"input\": \"Explain what makes Grok 4.5 different in two sentences.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://direct.evolink.ai/v1/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"grok-4.7\",\n \"input\": \"Explain what makes Grok 4.5 different in two sentences.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "55d44212-8d5e-90cc-975f-36d341ce21f5",
"object": "response",
"status": "completed",
"model": "grok-4.7",
"created_at": 1786538000,
"output": [
{
"id": "<string>",
"type": "message",
"status": "completed",
"content": [
{}
],
"encrypted_content": "<string>"
}
],
"usage": {
"input_tokens": 1692,
"output_tokens": 54,
"total_tokens": 1746,
"input_tokens_details": {
"cached_tokens": 512
},
"output_tokens_details": {
"reasoning_tokens": 35
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient quota",
"type": "insufficient_quota_error",
"fallback_suggestion": "https://evolink.ai/dashboard/billing"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"fallback_suggestion": "retry after 60 seconds"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "internal_server_error",
"fallback_suggestion": "try again later"
}
}{
"error": {
"code": 503,
"message": "Service temporarily unavailable",
"type": "service_unavailable_error",
"fallback_suggestion": "retry after 30 seconds"
}
}BaseURL: 기본 BaseURL은
https://direct.evolink.ai이며, 텍스트 모델 지원이 더 우수하고 장시간 연결을 지원합니다. https://api.evolink.ai는 멀티모달 서비스의 주력 엔드포인트이며, 텍스트 모델에 대해서는 대체 주소로 사용됩니다.인증
##모든 API는 Bearer Token 인증이 필요합니다##
API Key 받기:
API Key 관리 페이지를 방문하여 API Key를 받으세요
요청 헤더에 추가:
Authorization: Bearer YOUR_API_KEY
본문
application/json
호출할 모델:
| 모델 ID | 포지셔닝 |
|---|---|
grok-4.7 | xAI 추론 및 도구 호출 모델. 500K 토큰 컨텍스트 윈도우. xhigh 지원. 지식 기준: 2026-05 |
grok-4.6 | xAI 추론 + 도구 호출 모델, 컨텍스트 윈도우 500K; 지식 컷오프 2026-02-01 |
grok-4.5 | xAI 추론 + 도구 호출 모델, 컨텍스트 윈도우 500K |
사용 가능한 옵션:
grok-4.7, grok-4.6, grok-4.5 예시:
"grok-4.7"
모델에 전달할 입력 텍스트
예시:
"Explain what makes Grok 4.5 different in two sentences."
응답
응답 생성 성공
응답의 고유 식별자
예시:
"55d44212-8d5e-90cc-975f-36d341ce21f5"
응답 유형
사용 가능한 옵션:
response 예시:
"response"
응답 상태
사용 가능한 옵션:
completed, incomplete, failed 예시:
"completed"
실제 사용된 모델 이름
예시:
"grok-4.7"
생성 타임스탬프
예시:
1786538000
출력 항목. Grok 추론 모델은 일반적으로 reasoning 항목(사고 과정 요약)을 먼저 반환하고, 마지막에 최종 답변이 담긴 message 항목을 반환합니다.
Show child attributes
Show child attributes
토큰 사용 통계. 프롬프트가 200K 토큰 이상이면 모든 토큰 유형이 2배로 과금됩니다.
Show child attributes
Show child attributes