REST API를 통해 엔드포인트에 액세스하세요. 모든 AI 엔드포인트는 공개되어 있으며 인증이 필요하지 않습니다.
엔드포인트 실행
엔드포인트를 실행하고 사용량 메트릭을 포함한 LLM 응답을 반환합니다.
GET /api/v1/ai/:orgPath/:projectName/:endpointName
POST /api/v1/ai/:orgPath/:projectName/:endpointName
프롬프트만 받기
LLM을 호출하지 않고 생성된 프롬프트를 반환합니다. 디버깅에 유용합니다.
GET /api/v1/ai/:orgPath/:projectName/:endpointName/prompt
POST /api/v1/ai/:orgPath/:projectName/:endpointName/prompt
응답 형식
성공적인 응답에는 LLM 출력과 사용 통계가 포함됩니다:
출력LLM에서 제공하는 구조화된 응답으로, 당신의 출력 스키마와 일치함
사용량.토큰_입력사용된 입력 토큰 수
usage.tokens_output생성된 출력 토큰 수
사용량.지연 시간(밀리초)요청 지연 시간(밀리초 단위)
사용량.예상비용센트센트 단위로 예상 비용
예시 요청
curl -X POST https://api.shapeshyft.ai/api/v1/ai/my-org/my-project/classify \
-H "Content-Type: application/json" \
-d '{"text": "This is a great product!"}'예시 응답
{
"success": true,
"data": {
"output": {
"sentiment": "positive",
"confidence": 0.95
},
"usage": {
"tokens_input": 42,
"tokens_output": 15,
"latency_ms": 523,
"estimated_cost_cents": 1
}
}
}