Crusoe — vLLM 배포

Crusoe — vLLM 배포

Crusoe는 vLLM으로 구동되는 오픈 가중치 모델용 OpenAI 호환 API인 Managed Inference를 제공합니다. 이 서비스가 OpenAI API를 그대로 말하므로, 셀프 호스팅 vLLM 서버에 맞춰 작성한 코드를 수정 없이 Crusoe 엔드포인트에서 그대로 사용할 수 있습니다.

출처: 문서

본문

사전 준비 (Prerequisites)

  • Crusoe 계정
  • Crusoe Console의 Security > Inference API Key에서 생성한 Inference API 키

키를 환경 변수로 설정합니다.

export CRUSOE_API_KEY="your-api-key"

OpenAI SDK 사용

OpenAI 클라이언트를 Crusoe 엔드포인트로 지정합니다.

import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.inference.crusoecloud.com/v1",
    api_key=os.environ["CRUSOE_API_KEY"],
)

response = client.chat.completions.create(
    model="zai/GLM-5.2",
    messages=[{"role": "user", "content": "Hello, how are you?"}],
)

print(response.choices[0].message.content)

curl로 검증

curl https://api.inference.crusoecloud.com/v1/chat/completions \
    -H "Authorization: Bearer $CRUSOE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
        "model": "zai/GLM-5.2",
        "messages": [
            {"role": "user", "content": "Hello, how are you?"}
        ],
        "max_tokens": 50
    }'

사용 가능한 모델

현재 모델 카탈로그를 확인합니다.

curl https://api.inference.crusoecloud.com/v1/models \
    -H "Authorization: Bearer $CRUSOE_API_KEY"

전체 모델 목록과 API 상세는 Crusoe Managed Inference 문서를 참고하세요. vLLM의 OpenAI 호환 서빙을 백엔드로 쓰므로, chat.completions, completions, embeddings 같은 표준 OpenAI 호출이 그대로 동작합니다.

더 알아보기 (Learn more)