All integrations

smolagents

SDKs & frameworks

Hugging Face's minimal code-writing agents.

Base URL
https://api.ultragpt.pro/v1
Fill the guide with your values

Stays in this browser tab — never sent or stored by us. Sign in to create one

Setup

  1. 1Use OpenAIServerModel with api_base = https://api.ultragpt.pro/v1.
# pip install smolagents
import os
from smolagents import CodeAgent, OpenAIServerModel

model = OpenAIServerModel(model_id="grok-4.7", api_base="https://api.ultragpt.pro/v1", api_key=os.environ["ULTRAGPT_API_KEY"])
agent = CodeAgent(tools=[], model=model)
agent.run("What is the 20th Fibonacci number?")
Tips
  • Any model id from Models works; suffixes like :online (web search) and :nitro work too.
  • Give each tool its own key with a spend limit, so usage shows separately in Activity.
  • Something off? Error codes · Support