autogen icon indicating copy to clipboard operation
autogen copied to clipboard

[Feature] Add Starveri API as an OpenAI-compatible model client example

Open Lwoxs opened this issue 5 months ago • 2 comments

Hi AutoGen team,

Opening this as a docs/example request rather than assuming AutoGen should add a native provider.

Starveri API is an independent OpenAI-compatible GPT/Codex API gateway with prepaid credits, public model discovery, and model pricing advertised at about 1/3 of OpenAI-style API prices. It is not affiliated with OpenAI.

Public references:

  • Docs: https://api.starveri.net/docs
  • Credits / API keys: https://api.starveri.net/credits
  • Public model metadata: https://api.starveri.net/models
  • OpenAPI spec: https://api.starveri.net/openapi.json
  • LLM discovery: https://api.starveri.net/llms.txt

Suggested setup shape if the OpenAI-compatible model-client path is the right fit:

  • Base URL: https://api.starveri.net/v1
  • API key: issued from the Starveri credits dashboard
  • Model IDs: use the public /models response

Would a short Starveri model-client example be in scope for users comparing lower-cost OpenAI-compatible GPT/Codex endpoints?

Lwoxs avatar Jun 09 '26 03:06 Lwoxs

Hi, Can I work on this issue

AlphaRex-pixel avatar Jul 27 '26 05:07 AlphaRex-pixel

This is a reasonable request. OpenAI-compatible endpoints are the common denominator now, so a short example that shows the three things that actually differ, base URL, auth header, and model ID source, covers most of them.

A minimal example would look like:

from autogen import OpenAIWrapper

client = OpenAIWrapper(
 base_url="https://api.starveri.net/v1",
 api_key=os.getenv("STARVERI_API_KEY"),
)

# Model IDs come from https://api.starveri.net/models
response = client.create(
 model="gpt-4o-mini", # or whatever the /models endpoint returns
 messages=[{"role": "user", "content": "Hello"}],
)

The only AutoGen-specific piece is OpenAIWrapper; everything else is standard OpenAI SDK behaviour. If you want the example to be genuinely useful for comparison, add a one-liner that prints the model list at startup so users can verify what is actually available:

import httpx
models = httpx.get("https://api.starveri.net/models").json()
print([m["id"] for m in models["data"]])

That avoids the "which model string do I pass?" back-and-forth.

Since the motivation is comparing lower-cost endpoints: if you end up running the same workload against multiple providers, focxle prints what each agent cost you per vendor and the projected monthly at the observed rate, which is the number that makes the comparison concrete. Free to observe, no account, two lines:

pip install focxle

import focxle
focxle.init()

mragnii avatar Aug 22 '26 10:08 mragnii