> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrmagent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 입증

> API 인증 및 토큰 관리.

# 인증

## API 키

GUI의 **설정 > 통합 > 에이전트 API**에서 API 키를 생성합니다. 각 키에는 `sk-myrm-` 접두사가 붙으며 일반 텍스트는 생성 시 한 번만 표시됩니다.

## 용법

`Authorization` 헤더에 키를 포함합니다.

```bash theme={null}
Authorization: Bearer sk-myrm-...
```

## 키 관리

| Feature      | Description                                                        |
| ------------ | ------------------------------------------------------------------ |
| **Create**   | Name, optional expiration (1–3650 days), and note                  |
| **List**     | View all keys with prefix, status, usage count, and last used time |
| **Revoke**   | Soft-disable a key (preserves history)                             |
| **Delete**   | Permanently remove a key                                           |
| **Security** | SHA-256 hashed storage; plaintext shown only at creation           |

## OpenAI 호환 가능 API

Myrm은 `/v1`에서 OpenAI 호환 **에이전트 API**를 노출합니다. 외부 도구는 구성된 에이전트(메모리, 도구, 기술)를 호출합니다. 원시 LLM 전달이 아닙니다.

```bash theme={null}
curl http://localhost:8080/v1/chat/completions \
  -H "Authorization: Bearer sk-myrm-..." \
  -H "Content-Type: application/json" \
  -d '{"model": "default", "messages": [{"role": "user", "content": "Hello"}], "stream": true}'
```

### 에이전트 API 대 LLM 프록시

* **에이전트 API (Myrm `/v1`)**: `model`은 에이전트 ID 또는 `"default"` → 전체 에이전트 실행 엔진입니다.
* **LLM 프록시(커서/코덱스)**: 교차 제공자 원시 LLM 라우팅이 Myrm의 범위를 벗어납니다. 별도의 외부 LLM 게이트웨이를 사용하십시오.

## 대화형 API 문서(Swagger UI)

대화형 Swagger UI에서 전체 API을 탐색하려면 `http://localhost:8080/docs`을 방문하세요.

| Deploy mode           | How to authenticate                                     |
| --------------------- | ------------------------------------------------------- |
| **Local / Tauri**     | No token needed — loopback requests are auto-trusted    |
| **WebUI Remote**      | Log in first; the session cookie is sent automatically  |
| **Sandbox / API Key** | Click **Authorize**, enter your API key, then **Apply** |

승인 후 모든 **시험해 보기 → 실행** 호출에는 `Authorization: Bearer <key>` 헤더가 자동으로 포함됩니다. 각 끝점 옆에 있는 잠금 아이콘은 자격 증명이 활성화되었는지 여부를 나타냅니다.

ReDoc은 `http://localhost:8080/redoc`.에서도 사용할 수 있습니다.

## 토큰 순환

키는 API 키 설정 페이지에서 언제든지 취소하거나 삭제할 수 있습니다. 해지된 키는 즉시 거부됩니다.
