Skip to content

AI coding agents

DirectInference is a drop-in endpoint, so coding assistants and CLIs work the same way your app does — point them at the base URL and key, keep your model ids.

Cursor, Claude Code, and most agent frameworks let you override the API base URL and key — usually through environment variables or a settings field. Set them to your DI surface and the agent sends requests through DirectInference unchanged.

Terminal window
# Most OpenAI-compatible agents and CLIs read these:
export OPENAI_BASE_URL="https://app.directinference.com/di/v1"
export OPENAI_API_KEY="llm_live_..."
# Anthropic-compatible agents (e.g. Claude Code):
export ANTHROPIC_BASE_URL="https://app.directinference.com/di"
export ANTHROPIC_API_KEY="llm_live_..."

For assistants that read documentation directly, DirectInference publishes condensed, plain-text indexes of the API at the root of the public site. Point a coding agent at them to teach it the endpoint, request types, and effort contract in one fetch.

Because the switch is purely a base-URL-and-key change with the model ids left intact, an agent can convert an existing OpenAI, Anthropic, or Gemini integration mechanically — find the client construction, change two values, done. The full manual walkthrough is in Migrate to DirectInference.