{% extends "layouts/base.html" %} {% block main_content %} {% set breadcrumbs = [ {"name": t('nav.settings'), "url": "/settings", "icon": "fas fa-cog"}, {"name": t('settings.api_tokens'), "icon": "fas fa-key"} ] %} {% set header_title = t('settings.api_tokens') %} {% set header_subtitle = t('tokens.title') %} {% set header_icon = "fas fa-key" %} {% set header_actions = [ { "type": "button", "text": t('tokens.generate'), "url": "#", "icon": "fas fa-plus", "style": "primary", "onclick": "showCreateToken()" } ] %} {% include "components/page_header.html" %}
Total Tokens
{{ stats.total_active if stats else 0 }}
Active
{{ stats.used_tokens if stats else 0 }}
Expiring
{{ stats.will_expire if stats else 0 }}
Never Expire
{{ stats.never_expire if stats else 0 }}
These tokens allow you to access the API programmatically
Generate your first API token to get started with programmatic access
Learn how to use the API with your tokens
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
"https://your-domain.com/api/prompts"
fetch('/api/prompts', {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
}).then(response => response.json())
import requests
headers = {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
response = requests.get('/api/prompts', headers=headers)
const axios = require('axios');
const response = await axios.get('/api/prompts', {
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Content-Type': 'application/json'
}
});
/api/prompts
/api/tokens
/api/categories
/api/user/info
/api/tokens/{id}
/api/stats