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 (full provider forms are covered in Custom providers). 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://api.directinference.com/di/v1"
export OPENAI_API_KEY="llm_live_..."
# Anthropic-compatible agents (e.g. Claude Code):
export ANTHROPIC_BASE_URL="https://api.directinference.com/di"
export ANTHROPIC_AUTH_TOKEN="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.

Terminal window
# Install the packaged skill once (shown: Claude Code's personal skills directory)
git clone https://github.com/Direct-Inference/skills.git
mkdir -p ~/.claude/skills
cp -R skills/skills/use-directinference ~/.claude/skills/
# Then, in any project, just ask: "switch this app to DirectInference"