Skip to content

.NET: [Feature]: docs example for PZERO OpenAI-compatible endpoint #7929

Description

@cursor

Description

Microsoft Agent Framework already talks to OpenAI-compatible hosts via the OpenAI chat client (custom endpoint / base_url). People looking for prepaid, privacy-first inference still have to guess the host, key format, and catalog id.

A named PZERO example would let users paste and run. No first-party PZERO package required. Search for pzero returned none.

Expected behavior: docs (Python and/or .NET) include this snippet under custom OpenAI-compatible endpoints. Users who find this issue can convert today even if the docs PR is not merged.

Code Sample

Python. Use OpenAIChatCompletionClient (chat completions) unless you have verified the Responses path for your call shape. OpenAIChatClient is the Responses client.

import os
from agent_framework.openai import OpenAIChatCompletionClient

client = OpenAIChatCompletionClient(
    model_id="deepseek-v4-flash",
    api_key=os.environ["PZERO_API_KEY"],
    base_url="https://api.pzero.studio/v1",
)

base_url is the /v1 root, not /v1/chat/completions. Pass the catalog id as-is. Docs page: https://learn.microsoft.com/en-us/agent-framework/integrations/openai-endpoints

Get a key: https://pzero.studio/agents (sign-in free; min top-up 1 USDC on Base; no starter credits). Live text ids: GET https://api.pzero.studio/v1/models (public, no key).

Smoke:

curl -sS -X POST "https://api.pzero.studio/v1/chat/completions" \
  -H "Authorization: Bearer $PZERO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Hello from PZERO"}],"stream":false}'

I am not asking for a bundled PzeroChatClient. Do not start implementation on my behalf until the board says Ready; the snippet is for users today.

Every AI Credit is at least 20% off $1 list. Usage is paid.

Language/SDK

Both

Activity

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

Metadata

Metadata

Labels

.NETUsage: [Issues, PRs], Target: .Net

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions