curl --request GET \
--url 'http://localhost:3000/api/v1/credentials?limit=20&offset=0' \
--header 'Authorization: Bearer <token>'
const response = await fetch('http://localhost:3000/api/v1/credentials?limit=20&offset=0', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/credentials"
headers = {"Authorization": "Bearer <token>"}
params = {"limit": 20, "offset": 0}
response = requests.get(url, headers=headers, params=params)
data = response.json()
{
"success": true,
"credentials": [
{
"id": "cred_123abc",
"provider": "openai",
"baseUrl": null,
"models": ["gpt-4", "gpt-3.5-turbo"],
"isValid": true,
"lastValidatedAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"maskedApiKey": "sk-...xyz"
}
],
"nextOffset": 20,
"hasMore": false,
"total": 5,
"message": "Credentials retrieved successfully"
}
{
"success": false,
"credentials": [],
"total": 0,
"hasMore": false,
"message": "Unauthorized"
}
Credentials
List Credentials
Retrieves all credentials for the authenticated user with masked API keys
GET
/
api
/
credentials
curl --request GET \
--url 'http://localhost:3000/api/v1/credentials?limit=20&offset=0' \
--header 'Authorization: Bearer <token>'
const response = await fetch('http://localhost:3000/api/v1/credentials?limit=20&offset=0', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/credentials"
headers = {"Authorization": "Bearer <token>"}
params = {"limit": 20, "offset": 0}
response = requests.get(url, headers=headers, params=params)
data = response.json()
{
"success": true,
"credentials": [
{
"id": "cred_123abc",
"provider": "openai",
"baseUrl": null,
"models": ["gpt-4", "gpt-3.5-turbo"],
"isValid": true,
"lastValidatedAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"maskedApiKey": "sk-...xyz"
}
],
"nextOffset": 20,
"hasMore": false,
"total": 5,
"message": "Credentials retrieved successfully"
}
{
"success": false,
"credentials": [],
"total": 0,
"hasMore": false,
"message": "Unauthorized"
}
Query Parameters
number
default:20
Number of results per page
number
default:0
Pagination offset
Response
boolean
Indicates if the request was successful
array
Array of credential objects
number
Offset for the next page of results
boolean
Indicates if there are more results available
number
Total number of credentials
string
Response message
curl --request GET \
--url 'http://localhost:3000/api/v1/credentials?limit=20&offset=0' \
--header 'Authorization: Bearer <token>'
const response = await fetch('http://localhost:3000/api/v1/credentials?limit=20&offset=0', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "http://localhost:3000/api/v1/credentials"
headers = {"Authorization": "Bearer <token>"}
params = {"limit": 20, "offset": 0}
response = requests.get(url, headers=headers, params=params)
data = response.json()
{
"success": true,
"credentials": [
{
"id": "cred_123abc",
"provider": "openai",
"baseUrl": null,
"models": ["gpt-4", "gpt-3.5-turbo"],
"isValid": true,
"lastValidatedAt": "2024-01-15T10:30:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"maskedApiKey": "sk-...xyz"
}
],
"nextOffset": 20,
"hasMore": false,
"total": 5,
"message": "Credentials retrieved successfully"
}
{
"success": false,
"credentials": [],
"total": 0,
"hasMore": false,
"message": "Unauthorized"
}
⌘I

