v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBRetriever API Keys
Create Retriever API Key
Generate a scoped API key for executing this specific retriever.
**Use Cases:**
- Provide external services with execution-only access
- Embed retriever calls in customer applications
- Create separate keys for staging vs production
- Implement per-customer access keys for SaaS products
**Security:**
- Keys grant EXECUTE_RETRIEVER permission only
- Keys are scoped to single retriever (cannot access others)
- Keys inherit org's rate limits
- Keys can be revoked instantly
- Key prefix (ret_sk_abc...) shown in UI for identification
**Ownership:**
- Only the organization that owns the retriever can create keys
- Verified by matching internal_id + namespace_id
**Key Format:**
- Prefix: ret_sk_
- Length: 60 characters
- Example: ret_sk_abcdefghijklmnopqrstuvwxyz123456789...
**Response:**
- Plaintext key shown ONLY ONCE in response
- Save the key immediately - it cannot be retrieved later
- Key prefix stored for identification in UI
post/v1/retrievers/{retriever_id}/api-keys
Path parameters
retriever_idstring required
Request body
Example request
{
"description": "Production API key for external service",
"expires_at": "2026-12-31T23:59:59Z",
"name": "production-key"
}Response
Successful Response
Example response
{
"created_at": "2025-01-01T00:00:00Z",
"created_by": "usr_admin",
"description": "Service account for ingestion",
"internal_id": "int_x1y2z3",
"key_hash": "2c26b46b68ffc68ff99b453c1d304134",
"key_id": "key_a1b2c3d4e5f6g7h",
"key_prefix": "sk_abc123...",
"name": "backend-service",
"organization_id": "org_demo123",
"permissions": [
"read",
"write"
],
"scopes": [],
"status": "active",
"user_id": "usr_a1b2c3d4e5f6g7h"
}