localhost
or 127.0.0.1
, is the default address for the API server. It is a loopback address, meaning any network communication sent to this address will stay within the same machine, keeping your data secure and private. This is common for developing applications.
If you are working in an office network and would like to make your server accessible to other devices within the same network, you can set the server address to your machine’s local IP address. These are typically private networks, meaning they’re not routable on the public internet.
Setting the server address to 0.0.0.0
configures it to accept connections on all network interfaces. This can expose your server to the public internet if your network is configured to allow external connections and route traffic from external sources to your server.
Authentication: Bearer
token in the header of requests made to your server.
Testing your API Key
text-generation
type model./completion
endpoint to interact with the model you have loaded. If you receive a response, your API Key is working. If you receive a 401 error, double check your command and try again.~/Library/Logs/ai-navigator
with a timestamped filename (for example <YYYY><MM><DD><HH><MM><SS>_api-server.log
), so you can efficiently locate specific server logs if necessary.