Chat Completions

Leverage Omnicron’s advanced AI capabilities to generate sophisticated chat responses. Powered by GROQ AI models and the G4F library, Omnicron ensures efficient and high-quality chat interactions.

Cost-effective and reliable.

  • Using the GROQ Endpoint: Navigate to the endpoint /api/v1/grok/chatcompletion.
curl
curl -X POST http://localhost:9000/api/v1/groq/chatcompletion \
  -H "Authorization: Bearer MY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "Explain the importance of fast language models"
      }
    ],
    "model": "gpt-4o"
  }'
For details about the parameters, visit the groq reference page.
  • Using the G4F Endpoint: Navigate to the endpoint /api/v1/gpt4free.
curl
curl -X POST http://localhost:9000/api/v1/gpt4free \
  -H "Authorization: Bearer MY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "role": "user",
        "content": "Explain the importance of fast language models"
      }
    ],
    "model": "llama3-8b-8192"
  }'
For details about the parameters, visit the g4f reference page.

Conclusion

Both the GROQ and G4F endpoints provide robust solutions for generating chat completions. Depending on your specific needs and preferences, you can choose either endpoint to integrate into your application. Feel free to explore both endpoints and consult the respective API references for detailed information on parameters and usage.