Get all API keys registered to the user
/v2/api-keys
curl -L \ --url 'https://api.mlfoundry.com/v2/api-keys' \ --header 'Authorization: Bearer fkey_<key>'
[ { "fid": "apikey_abc123456", "name": "text", "created_at": "2024-01-01T00:00:00Z", "expires_at": "2024-01-01T00:00:00Z", "deactivated_at": "2024-01-01T00:00:00Z", "snippet": "fkey_abc1..." } ]
Create a new API key
2024-01-01T00:00:00Z
curl -L \ --request POST \ --url 'https://api.mlfoundry.com/v2/api-keys' \ --header 'Authorization: Bearer fkey_<key>' \ --header 'Content-Type: application/json' \ --data '{ "name": "text", "expires_at": "2024-01-01T00:00:00Z" }'
{ "fid": "apikey_abc123456", "name": "text", "created_at": "2024-01-01T00:00:00Z", "expires_at": "2024-01-01T00:00:00Z", "deactivated_at": "2024-01-01T00:00:00Z", "snippet": "fkey_abc1...", "secret": "fkey_abc123456" }
Revoke an API key
/v2/api-keys/{key_fid}
apikey_abc123456
curl -L \ --request DELETE \ --url 'https://api.mlfoundry.com/v2/api-keys/{key_fid}' \ --header 'Authorization: Bearer fkey_<key>'
No body