HTTP 요청(curl)
MarkdownSDK 없이 API 사용: HTTP 요청을 보낼 수 있는 모든 언어와 도구에서 사용합니다.
전체 가이드
모든 요청의 대상 주소: https://api.ailoot.ai — HTTPS로 보내며 본문은 JSON입니다(파일 업로드는 multipart). 키는 인증 헤더 중 하나에 넣습니다.
export AILOOT_API_KEY="sk-..."OpenAI Chat Completions
curl https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"messages": [
{"role": "user", "content": "API가 무엇인지 두 문장으로 설명해 줘."}
]
}' 스트리밍 응답
플래그 -N 는 curl 버퍼링을 해제해 이벤트가 도착하자마자 표시되게 합니다. 각 이벤트의 시작: data:, 스트림의 종료 줄: data: [DONE].
curl -N https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-v4-pro", "stream": true,
"messages": [{"role": "user", "content": "다섯까지 세어 줘"}]}' OpenAI Responses
curl https://api.ailoot.ai/v1/responses \
-H "Authorization: Bearer $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-6.1-sol", "input": "동료의 생일을 축하하는 건배사를 써 줘"}' Anthropic Messages
curl https://api.ailoot.ai/v1/messages \
-H "x-api-key: $AILOOT_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "안녕! 어떤 일을 할 수 있어?"}]
}' Gemini
curl "https://api.ailoot.ai/v1beta/models/gemini-3.8-flash:generateContent" \
-H "x-goog-api-key: $AILOOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{"role": "user", "parts": [{"text": "카페 이름 세 가지를 제안해 줘."}]}
]
}' 모델 목록
curl -s https://api.ailoot.ai/v1/models \
-H "Authorization: Bearer $AILOOT_API_KEY" | jq -r '.data[].id'응답 헤더
헤더를 보려면 다음을 추가하세요: -i — 응답 헤더를 표시합니다. X-Request-ID — 요청 식별자이며 오류 메시지에도 동일하게 표시됩니다. X-Ailoot-Charged-USD — 유료 텍스트 응답의 차감 금액입니다. 전체 헤더 설명 페이지: 작동 방식.
궁금한 점이 남았나요? Request ID와 설명을 보내 주시면 해결을 도와드리겠습니다.지원팀에 문의