BaşlayınÜcretsiz Başlayın

Secure the API endpoint

You have a sentiment analysis model API that needs to be protected with API key authentication.

You've already set up the verify_api_key function, and now you need to create a protected endpoint that accepts the request with text input and returns predictions from the model. This endpoint should only be accessible to users with valid API keys.

You will be working within main.py to complete this exercise.

All the supporting code including verify_api_key and model loading is in model.py

Bu egzersiz

Deploying AI into Production with FastAPI

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

İnteraktif egzersizlerimizden biriyle teoriyi pratiğe dökün

Egzersizi başlat