!API-Key Tester for Anywhere LLM using CURL

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > !API-Key Tester for CURL-Command >

!API-Key Tester for Anywhere LLM using CURL

 

To test the validity of your Anywhere LLM API key aside from using SPR, you can use CURL.

 

1. Ensure Anywhere LLM is running locally on your machine (default URL: http://localhost:3001).

2. Insert your Anywhere LLM API key into the SPR script below at the `$$KEY` variable.

3. Run this SPR script.

It will generate a CURL command-line script and copy it to the clipboard.

4. Open a Command Prompt (CMD) console, paste the clipboard contents, and press "ENTER" to execute.

 

 

 

' Enter your API-Key, this Key you need to generate inside 

' your local Instance of the "Anything LLM" (Docker Version only)

$$KEY=DASJSDE0-ERDHEQFWH6-RYD1ZWY

 

$$TXT=curl -X GET "http://localhost:3001/api/v1/openai/models"

$$TXT+ -H "accept: application/json" -H "Authorization: Bearer $$KEY"

CLB.Set Text|$$TXT

ENR.

 

clip1093

Running the generated CURL script from the clipboard in a CMD console will display this result if the API key is valid.