clean up & add docs

This commit is contained in:
9qeklajc
2026-01-26 20:44:23 +01:00
parent 42258ae39c
commit bbf1e65a5d
4 changed files with 36 additions and 4 deletions
+36
View File
@@ -434,6 +434,42 @@ Authorization: Bearer sk-...
}
```
### Create Child Key
Creates one or more child API keys that share the parent's balance. Each child key creation costs a fixed amount (configurable).
```http
POST /v1/balance/child-key
Authorization: Bearer sk-...
```
**Request Body:**
```json
{
"count": 1
}
```
**Parameters:**
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `count` | integer | Yes | - | Number of child keys to create (1-50) |
**Response:**
```json
{
"api_keys": ["sk-abc...", "sk-def..."],
"count": 2,
"cost_msats": 2000,
"cost_sats": 2,
"parent_balance": 98000,
"parent_balance_sats": 98
}
```
## Provider Discovery
## Admin Settings
-1
View File
@@ -310,7 +310,6 @@ async def create_child_key(
response_data = {
"api_keys": new_keys,
"api_key": new_keys[0], # For backward compatibility
"count": count,
"cost_msats": total_cost,
"cost_sats": total_cost // 1000,
-2
View File
@@ -65,8 +65,6 @@ export function ChildKeyCreator({
if (result.api_keys && result.api_keys.length > 0) {
setNewKeys(result.api_keys);
} else if (result.api_key) {
setNewKeys([result.api_key]);
} else {
throw new Error('No API keys returned from server');
}
-1
View File
@@ -44,7 +44,6 @@ export interface WithdrawResponse {
export interface CreateChildKeyResponse {
api_keys: string[];
api_key: string;
count: number;
cost_msats: number;
cost_sats: number;