# 健康检查

服务是否在线。

> Source: https://tokenearly.com/developers/rest/health · Docs index: https://tokenearly.com/developers/llms.txt · OpenAPI: https://api.tokenearly.com/v1/openapi.json

`GET https://api.tokenearly.com/v1/health`

无需 Key，不计入限流。适合放进你的监控。

**公开接口，无需 Key**

## 参数

没有参数。

## 请求示例

**cURL**

```bash
curl "https://api.tokenearly.com/v1/health"
```

**Python**

```python
import requests

resp = requests.get("https://api.tokenearly.com/v1/health", timeout=10)
resp.raise_for_status()
print(resp.json())
```

**Node.js**

```javascript
// Node 18+ (built-in fetch)
async function main() {
  const resp = await fetch("https://api.tokenearly.com/v1/health");
  console.log(await resp.json());
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.tokenearly.com/v1/health", nil)
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(body))
}
```

## 示例响应

```json
{
  "status": "ok",
  "spec_version": "1.0"
}
```
