Skip to content

Conversation

@michaelbrinkworth
Copy link

Add AI Badgr as a cheaper OpenAI-compatible backend

This PR adds a short documentation section showing how to use AI Badgr as a drop-in replacement for OpenAI's API at a fraction of the cost.

What's Changed

  • Added a new section to the README explaining how to override the base_url parameter
  • Included code examples for:
    • Python (using the openai package)
    • JavaScript/Node.js (using the openai package)
    • cURL (command-line usage)
  • Notes on advanced features (streaming, JSON mode)

Key Points

  • Cheaper alternative - AI Badgr offers OpenAI-compatible API at significantly lower costs
  • Docs-only change - No code modifications or breaking changes
  • Optional provider - Developers can choose to use it or not
  • OpenAI-compatible - Works with existing OpenAI client libraries (just swap the base_url)
  • Simple integration - Just override base_url and optionally api_key

Technical Details

AI Badgr implements the OpenAI API specification, supporting:

  • Chat completions with streaming
  • JSON mode responses
  • Compatible with standard OpenAI SDKs
  • Same API interface, lower costs

This is an optional addition that gives developers a cost-effective alternative backend choice for their OpenAI-compatible applications.


Contributor License Agreement: I agree to the contributor license agreement terms for this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant