메인 콘텐츠로 건너뛰기
POST
/
api
/
v1
/
keys
curl -X POST https://api.arouter.ai/api/v1/keys \
  -H "Authorization: Bearer lr_mgmt_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-backend",
    "allowed_providers": ["openai", "anthropic"],
    "limit": 150,
    "limit_reset": "monthly",
    "expires_at": "2025-12-31T23:59:59Z"
  }'
import requests

resp = requests.post(
    "https://api.arouter.ai/api/v1/keys",
    headers={"Authorization": "Bearer lr_mgmt_xxxx"},
    json={
        "name": "production-backend",
        "allowed_providers": ["openai", "anthropic"],
        "limit": 150,
        "limit_reset": "monthly",
    },
)
key, err := client.CreateKey(ctx, &arouter.CreateKeyRequest{
    Name:             "production-backend",
    AllowedProviders: []string{"openai", "anthropic"},
    Limit:            float64Ptr(150),
    LimitReset:       "monthly",
})
const key = await router.createKey({
  name: "production-backend",
  allowed_providers: ["openai", "anthropic"],
  limit: 150,
  limit_reset: "monthly",
});
console.log("API Key:", key.key); // lr_live_xxx
curl -X POST https://api.arouter.ai/api/v1/keys \
  -H "Authorization: Bearer lr_mgmt_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-backend",
    "allowed_providers": ["openai", "anthropic"],
    "limit": 150,
    "limit_reset": "monthly",
    "expires_at": "2025-12-31T23:59:59Z"
  }'
import requests

resp = requests.post(
    "https://api.arouter.ai/api/v1/keys",
    headers={"Authorization": "Bearer lr_mgmt_xxxx"},
    json={
        "name": "production-backend",
        "allowed_providers": ["openai", "anthropic"],
        "limit": 150,
        "limit_reset": "monthly",
    },
)
key, err := client.CreateKey(ctx, &arouter.CreateKeyRequest{
    Name:             "production-backend",
    AllowedProviders: []string{"openai", "anthropic"},
    Limit:            float64Ptr(150),
    LimitReset:       "monthly",
})
const key = await router.createKey({
  name: "production-backend",
  allowed_providers: ["openai", "anthropic"],
  limit: 150,
  limit_reset: "monthly",
});
console.log("API Key:", key.key); // lr_live_xxx