인증
관리자 메뉴에서 발급한 API 키를 bearer token으로 전달합니다.
Authorization: Bearer <relay-api-key>
사용자 승인, 비활성화, 서비스별 API 키 발급을 관리합니다.
로그인한 사용자의 비밀번호를 변경합니다.
워커 연결, 처리 중 요청, 큐 대기, 실패와 서킷 상태를 확인합니다.
최근 API 호출 기준의 GPU별 처리 시간, 큐 대기 시간, 실패 건수를 확인합니다.
대기열, failover, worker circuit breaker 정책을 조정합니다. 변경 사항은 DB에 저장됩니다.
현재 로드된 GPU 슬롯 또는 모델로 OpenAI-compatible chat completion을 직접 호출합니다.
아직 테스트 출력이 없습니다.
현재 연결된 STT 워커 모델로 녹음한 음성을 OpenAI-compatible audio transcription endpoint에 보냅니다.
아직 테스트 출력이 없습니다.
워커를 안정적인 GPU 번호에 매핑하고 worker 동시 처리값을 조정합니다.
선택한 워커의 모델 백엔드 상태를 조회하고 지원되는 작업을 관리합니다.
먼저 모델 작업을 수행할 Windows GPU worker를 선택합니다.
선택한 워커의 로컬 LM Studio 모델 목록을 새로고침하고, 사용할 모델을 GPU에 로드합니다.
Hugging Face에서 검색해 선택하거나, LM Studio catalog ID/Hugging Face URL을 직접 입력합니다.
최근 시작한 다운로드 작업의 상태와 속도를 확인합니다.
선택한 워커의 로컬 LM Studio 모델 목록을 확인합니다.
외부 앱에서 gpu-relay를 호출할 때 필요한 주요 API와 요청 예시입니다.
관리자 메뉴에서 발급한 API 키를 bearer token으로 전달합니다.
Authorization: Bearer <relay-api-key>
현재 연결된 worker에 로드되어 사용 가능한 모델과 GPU 슬롯 alias를 OpenAI-compatible 목록으로 반환합니다. gpu_relay.gpus에는 gpu, gpu-0 같은 라우팅 항목과 로드 모델, 큐 상태가 포함됩니다.
curl https://gpu-translation.develeste.com/v1/models \ -H "Authorization: Bearer $GPU_RELAY_API_KEY"
OpenAI-compatible chat completion입니다. model에는 gpu, gpu-0 같은 GPU 번호 또는 실제 모델명을 사용할 수 있습니다. queue_priority는 normal, priority, highest 중 하나입니다. temperature를 생략하면 모델 관리에서 저장한 GPU+모델별 기본값이 적용되고, 저장값이 없으면 0입니다.
curl https://gpu-translation.develeste.com/v1/chat/completions \
-H "Authorization: Bearer $GPU_RELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpu",
"stream": true,
"queue_priority": "highest",
"failover": true,
"messages": [
{"role": "system", "content": "Translate accurately. Return only translated text."},
{"role": "user", "content": "Hello, this is a GPU relay test."}
]
}'
model: "gpu"는 모델명과 무관하게 가장 여유 있는 GPU 큐로 들어갑니다. model: "gpu-1"은 해당 GPU 큐에 들어갑니다. 모델명을 지정하면 그 모델이 로드된 GPU 중 가장 여유 있는 큐를 선택합니다.
failover를 요청에 넣으면 GPU별 설정과 전역 기본값보다 우선합니다. 요청에 없으면 GPU 슬롯의 failover 설정을 따르고, GPU별 설정이 없으면 라우팅 화면의 전역 기본값을 사용합니다.
response_format이 있으면 worker가 LM Studio /api/v1/chat의 system prompt 끝에 JSON 출력 규칙을 주입하고, 응답 JSON을 검증해 반환합니다. reasoning은 LM Studio 모델 메타데이터의 capabilities.reasoning.allowed_options에 있을 때만 전달합니다.
{
"model": "gpu-0",
"messages": [{"role": "user", "content": "Translate Hello to Korean"}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "translation",
"schema": {
"type": "object",
"properties": {"text": {"type": "string"}},
"required": ["text"]
}
}
}
}
최종 응답에는 실제 처리한 worker, GPU, 모델 정보가 gpu_relay로 포함됩니다.
{
"gpu_relay": {
"worker_id": "home-gpu-01",
"gpu_index": 0,
"gpu_alias": "gpu-0",
"model": "qwen/qwen3-vl-4b",
"requested_model": "gpu-0"
}
}
대시보드와 동일한 worker, GPU별 priority queue, circuit, active request 상태를 반환합니다.
curl https://gpu-translation.develeste.com/status \ -H "Authorization: Bearer $GPU_RELAY_API_KEY"
최근 API 호출 로그와 GPU별 응답 시간, 호출 건수, 오류 수를 조회합니다.
curl https://gpu-translation.develeste.com/requests \ -H "Authorization: Bearer $GPU_RELAY_API_KEY" curl https://gpu-translation.develeste.com/stats/summary \ -H "Authorization: Bearer $GPU_RELAY_API_KEY"
세션 로그인한 관리자만 호출합니다. 대시보드에서 GPU 슬롯, worker 동시성, 라우팅 설정, 모델 백엔드 관리를 수행합니다.
GET /gpu-slotsPUT /gpu-slots/{worker_id}PUT /gpu-slots/{worker_id}/failoverPUT /gpu-slots/{worker_id}/disabledPUT /workers/{worker_id}/max-concurrencyGET /routing/config, PUT /routing/configGET /workers/{worker_id}/lmstudio/modelsPOST /workers/{worker_id}/lmstudio/models/loadPOST /workers/{worker_id}/lmstudio/models/unloadPOST /workers/{worker_id}/lmstudio/models/downloadGET /huggingface/models?q={query}