---
title: "Get a persisted subagent"
---

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

Path: Shiba public API

`GET /subagents/{subagentId}`

## Authentication

- `bearerAuth`, http, header `Authorization`, format `API key`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/subagents/%7BsubagentId%7D' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/subagents/%7BsubagentId%7D';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/subagents/%7BsubagentId%7D"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Subagent detail with recorded usage in tokens and USD when available

### 404

Subagent not found


Source: https://tryshiba.dev/reference/api/get/subagents/subagentId/index.md
