| title | API Keys |
|---|---|
| icon | key |
| description | Manage your Developer API keys |
Retrieve all your developer API keys This endpoint requires your signed-in Omi/Firebase session. The secret key values are not returned (only the prefix is shown). ```bash curl -H "Authorization: Bearer $FIREBASE_ID_TOKEN" \ "https://api.omi.me/v1/dev/keys" ``` ```python import requests
response = requests.get(
"https://api.omi.me/v1/dev/keys",
headers={"Authorization": f"Bearer {firebase_id_token}"}
)
keys = response.json()
```
Create a new developer API key Create keys from the signed-in Omi web app. The REST endpoint is the same self-service flow and requires a Firebase ID token, not an existing `omi_dev_...` key. The new secret is returned only once. | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `name` | string | **Yes** | Descriptive name for the key | | `scopes` | array of strings | No | Permissions for the key. If omitted, the key receives the read-only scopes. | ```bash curl -X POST "https://api.omi.me/v1/dev/keys" \ -H "Authorization: Bearer $FIREBASE_ID_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "My New Integration", "scopes": ["memories:read"]}' ``` ```python import requests
response = requests.post(
"https://api.omi.me/v1/dev/keys",
headers={
"Authorization": f"Bearer {firebase_id_token}",
"Content-Type": "application/json"
},
json={"name": "My New Integration", "scopes": ["memories:read"]}
)
new_key = response.json()
print(f"Store this key securely: {new_key['key']}")
```
Choose the least-privileged scopes needed by your integration:
- Read:
conversations:read,memories:read,action_items:read,goals:read - Write:
conversations:write,memories:write,action_items:write,goals:write
Memory scopes authorize the key, but they do not bypass the account-level Developer Memory API readiness gate. See Memories for that availability contract.
Revoke (delete) a specific API key permanently | Parameter | Type | Description | |-----------|------|-------------| | `key_id` | string | The ID of the key to revoke | ```bash curl -X DELETE "https://api.omi.me/v1/dev/keys/key_789ghi" \ -H "Authorization: Bearer $FIREBASE_ID_TOKEN" ``` ```python import requests
response = requests.delete(
f"https://api.omi.me/v1/dev/keys/key_789ghi",
headers={"Authorization": f"Bearer {firebase_id_token}"}
)
if response.status_code == 204:
print("Key revoked successfully")
```
Name keys after their purpose (e.g., "Analytics Dashboard", "Zapier Integration") Create separate keys for different apps so you can revoke them independently Check `last_used_at` to identify unused or potentially compromised keys Periodically create new keys and revoke old ones
```python import requests
API_KEY = "omi_dev_your_api_key"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
def list_keys():
"""List all API keys"""
response = requests.get(
"https://api.omi.me/v1/dev/keys",
headers=headers
)
return response.json()
def create_key(name):
"""Create a new API key"""
response = requests.post(
"https://api.omi.me/v1/dev/keys",
headers=headers,
json={"name": name}
)
return response.json()
def revoke_key(key_id):
"""Revoke an API key"""
response = requests.delete(
f"https://api.omi.me/v1/dev/keys/{key_id}",
headers=headers
)
return response.status_code == 204
# List existing keys
print("Current API keys:")
for key in list_keys():
last_used = key.get("last_used_at", "Never")
print(f" - {key['name']} ({key['key_prefix']}...) - Last used: {last_used}")
# Create a new key
print("\nCreating new key...")
new_key = create_key("Test Integration")
print(f"Created: {new_key['name']}")
print(f"Key: {new_key['key']}") # Store this securely!
# Revoke a key (example)
# if revoke_key("key_123abc"):
# print("Key revoked successfully")
```
async function listKeys() {
const response = await fetch("https://api.omi.me/v1/dev/keys", { headers });
return response.json();
}
async function createKey(name) {
const response = await fetch("https://api.omi.me/v1/dev/keys", {
method: "POST",
headers,
body: JSON.stringify({ name })
});
return response.json();
}
async function revokeKey(keyId) {
const response = await fetch(`https://api.omi.me/v1/dev/keys/${keyId}`, {
method: "DELETE",
headers
});
return response.status === 204;
}
// List existing keys
console.log("Current API keys:");
const keys = await listKeys();
keys.forEach(key => {
const lastUsed = key.last_used_at || "Never";
console.log(` - ${key.name} (${key.key_prefix}...) - Last used: ${lastUsed}`);
});
// Create a new key
console.log("\nCreating new key...");
const newKey = await createKey("Test Integration");
console.log(`Created: ${newKey.name}`);
console.log(`Key: ${newKey.key}`); // Store this securely!
// Revoke a key (example)
// if (await revokeKey("key_123abc")) {
// console.log("Key revoked successfully");
// }
```
You can also manage API keys directly in the Omi app:
Launch the Omi app on your device Go to **Settings → Developer** Under "Developer API Keys" you can: - View all your keys - Create new keys - Delete existing keys Keys created in the app and via the API are the same - you can manage them from either place.