Keyless GPT Wrapper API
Connect with DuckDuckGo's AI chat and make API requests to LLaMA effortlessly, without cost.
Get StartedGetting Started
Local Setup
Docker
Docker (local image build)
git clone https://github.com/callbacked/keyless-gpt-wrapper-api && cd keyless-gpt-wrapper-api
pip install -r requirements.txt
python server.py
API Commands
Available Models
curl -X GET http://127.0.0.1:1337/v1/models
Lists all available models including GPT4o Mini, Claude 3 Haiku, Mixtral 8x7b, and Llama 70b
Send a Message
curl -X POST "http://localhost:1337/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "keyless-gpt-4o-mini",
"messages": [
{"role": "user", "content": "Tell me a joke"}
],
"stream": false
}'
Send a message to any available model
Continue Conversation
curl -X POST "http://localhost:1337/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "keyless-gpt-4o-mini",
"messages": [
{"role": "user", "content": "Tell me another joke"}
],
"conversation_id": "58a22f8d-64b8-45c1-97c4-030d11e6d1b9",
"stream": false
}'
Continue a conversation using the conversation_id
Delete Conversation
curl -X DELETE http://localhost:1337/v1/conversations/1cecdf45-df73-431b-884b-6d233b5511c7
Delete a specific conversation by its ID
(Optional) Available TTS Voices
curl -X GET http://127.0.0.1:1337/v1/audio/speech/voices
Lists all available TTS voices
(Optional) Message with Voice Generation
curl -X POST "http://localhost:1337/v1/chat/completions" \
-H "Content-Type: application/json" \
-d '{
"model": "keyless-gpt-4o-mini",
"messages": [
{"role": "user", "content": "Tell me a joke"}
],
"modalities": ["audio"],
"audio": {
"voice": "en_us_002"
},
"stream": false
}' | jq -r '.choices[0].message.audio.data' | base64 -d > speech.mp3
Get an LLM response with generated speech (Only works with stream:false
)
(Optional) Standalone TTS
curl -X POST "http://localhost:1337/v1/audio/speech" \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, this is a test message",
"voice": "en_us_002"
}' --output speech.mp3
Generate speech from your own input text
Integrate Elsewhere
Use the API wrapper in your favorite AI assistant tools and enhance your productivity (Your mileage may vary).