Last Updated: 9/25/2024
The API expects a POST request with specific parameters in JSON format. You'll also need to include an API key in the query string.
curl -X POST "https://api.nofiltergpt.com/v1/chat/completions?api_key=AIzacDsdsaXZ-HjGw7I11vevV" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello! Can you help me with something?"}
],
"temperature": 0.7,
"max_tokens": 150,
"top_p": 1
}'
The following parameters must be included in the body of the POST request:
"system"
, "user"
, etc.) and the corresponding content.Make sure to include the API key in the query string:
https://api.nofiltergpt.com/v1/chat/completions?api_key=YOUR_API_KEY
Replace YOUR_API_KEY
with the actual API key provided: AIzacDsdsaXZ-HjGw7I11vevV.
The API will return the response, which might include data such as the generated text or error messages if any required parameters are missing or the API key is invalid. If successful, the response will be saved to a file, and you can see the data as part of the output stream.
The API responds with error messages and appropriate HTTP status codes: