Hello! And thank you for using the lightning web api. This documentation is to ensure you get started and fimiliar with the api. The api is not that fairly complicated as it was designed to only return the data that is needed.
This api was built from the ground up, using its own secure auth system, ensuring that your api key is never leaked unless you do so. This API is still a work in progress and I am still adding new endpoints weekly. Please keep in mind that internal errors do happen but it is not frequent. This is just a fun side project for me but I hope to go further with it in the near future. Aside from that, response can take a while depending on how lengthy your prompt is.
To send your first api request, you need to go to the signup page and create your account there. After that, check your inbox for a verification link. After you click the verification link, head over to your dashboard and thats where your api key will be. Do not share your api key with anyone, that is yours and yours only
Here are some recommended suggestions for using the api key:
Before you go ahead, please take a quick look at these post request Examples
import requests
request_body = {
'prompt': 'Hello!',
'max_tokens': 100,
'temperature': 0.4,
'top_p': 0.4,
'system_prompt': 'This is a system prompt'
}
headers = {
'Authorization': '<YOUR API KEY>'
}
url = 'https://api.lightningweb.xyz/api/ai/llama3-70binstruct'
response = requests.post(url, headers=headers, json=request_body)
print(response.json())