List and retrieve language models for inference
https://api.pinference.ai/api/v1
Authorization: Bearer your_api_key
curl -X GET https://api.pinference.ai/api/v1/models \ -H "Authorization: Bearer $API_KEY"
{ "object": "list", "data": [ { "id": "meta-llama/llama-3.1-70b-instruct", "object": "model", "owned_by": "meta", "created": 1693721698 }, { "id": "anthropic/claude-3-5-sonnet-20241022", "object": "model", "owned_by": "anthropic", "created": 1693721698 } ] }
curl -X GET https://api.pinference.ai/api/v1/models/meta-llama/llama-3.1-70b-instruct \ -H "Authorization: Bearer $API_KEY"
{ "id": "meta-llama/llama-3.1-70b-instruct", "object": "model", "owned_by": "meta", "created": 1693721698 }
{ "error": { "message": "The model 'invalid-model' does not exist", "type": "invalid_request_error", "code": "model_not_found" } }
{ "error": { "message": "Invalid API key", "type": "authentication_error", "code": "invalid_api_key" } }