메인 콘텐츠로 건너뛰기
모든 Claw API 엔드포인트는 Authorization: Bearer sk-... 헤더를 통한 인증이 필요합니다. 기본 URL: https://api.lemondata.cc/v1/claw

인스턴스 목록 조회

GET /v1/claw/instances
인증된 조직의 모든 인스턴스를 반환합니다.
curl https://api.lemondata.cc/v1/claw/instances \
  -H "Authorization: Bearer sk-your-api-key"
{
  "instances": [
    {
      "id": "cm5abc123",
      "subdomain": "mybot",
      "url": "https://claw-mybot.lemondata.cc",
      "defaultModel": "claude-opus-4-6",
      "hasIMConfig": true,
      "status": "RUNNING",
      "paidUntil": "2026-03-10T00:00:00.000Z",
      "canRebuild": true,
      "totalPaid": 20,
      "createdAt": "2026-02-08T00:00:00.000Z"
    }
  ]
}

인스턴스 상태 값

상태설명
PENDING방금 생성됨, 프로비저닝 대기 중
PROVISIONING컨테이너 배포 중
RUNNING인스턴스가 활성화되어 있으며 정상 상태임
STOPPED만료로 인해 중지됨 (데이터는 7일간 보관)
FAILED배포 실패 (자동 환불됨)
DELETED영구적으로 삭제됨

인스턴스 생성

POST /v1/claw/instances
새 인스턴스를 생성하고 조직 잔액에서 30일 동안 $20를 차감합니다.
subdomain
string
필수
서브도메인 (3-32자, 소문자 영숫자 + 하이픈). 인스턴스 URL: https://claw-{subdomain}.lemondata.cc
defaultModel
string
기본 AI 모델 (예: claude-opus-4-6, gpt-5.2, gemini-3-pro-preview, minimax-m2.5, kimi-k2.5)
curl -X POST https://api.lemondata.cc/v1/claw/instances \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"subdomain": "mybot", "defaultModel": "claude-opus-4-6"}'
{
  "id": "cm5abc123",
  "subdomain": "mybot",
  "url": "https://claw-mybot.lemondata.cc",
  "status": "PENDING",
  "paidUntil": "2026-03-10T00:00:00.000Z",
  "charged": true,
  "chargedAmount": 20
}
잔액이 부족하면 402 Payment Required를 반환합니다. 인스턴스를 생성하기 전에 조직에 최소 $20가 있는지 확인하세요.

인스턴스 조회

GET /v1/claw/instances/:id
특정 인스턴스의 상세 정보를 반환합니다.

인스턴스 업데이트

PATCH /v1/claw/instances/:id
인스턴스 설정을 업데이트합니다.
defaultModel
string | null
기본 AI 모델 변경
imConfig
object | null
IM 플랫폼 설정 업데이트 (Telegram, Discord 등)
curl -X PATCH https://api.lemondata.cc/v1/claw/instances/cm5abc123 \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"defaultModel": "claude-sonnet-4-5"}'

인스턴스 재빌드

POST /v1/claw/instances/:id/rebuild
데이터(PVC)를 보존하면서 컨테이너를 삭제하고 다시 생성합니다. 하루 10회 재빌드로 제한됩니다. 일일 제한을 초과하면 429 Too Many Requests를 반환합니다.

인스턴스 갱신

POST /v1/claw/instances/:id/renew
결제 기간을 30일($20) 연장합니다. 만료로 인해 인스턴스가 중지된 경우 자동으로 다시 시작됩니다.
{
  "id": "cm5abc123",
  "subdomain": "mybot",
  "status": "RUNNING",
  "paidUntil": "2026-04-09T00:00:00.000Z",
  "charged": true,
  "chargedAmount": 20
}

헬스 체크

GET /v1/claw/health
Claw 서비스의 상태를 반환합니다. 인증이 필요하지 않습니다.
{"status": "ok", "timestamp": "2026-02-08T15:00:00.000Z"}