Docs target current release v0.7.0.v0.7.1 is under review

OpenAI adapter

Terminal
pip install "opentine[openai]"
export OPENAI_API_KEY="..."
openai_agent.py
1from opentine import Agent
2from opentine.models.openai import OpenAI
3
4model = OpenAI(
5    model="gpt-5.6",
6    api_key=None,
7    base_url=None,
8)
9run = Agent(model=model).run_sync("Summarize this decision.")

Adapter behavior

  • Native OpenAI calls use Responses API items, tool continuation, refusals, and final usage.
  • The constructor defaults to gpt-5.6.
  • Usage includes cache and reasoning details when the provider reports them.
  • Billing resolves an effective catalog card or explicit override and warns when the reported model differs.

Compatible endpoints

Setting base_url switches to Chat Completions and provider identity openai-compatible by default. It reads OPENAI_COMPAT_API_KEY, does not forward OPENAI_API_KEY implicitly, and starts with unknown hosted billing unless you set a provider or rates. See compatible runtimes.