All integrations

Mastra

SDKs & frameworks

TypeScript agent framework; it takes any AI SDK model.

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. 1Create an OpenAI-compatible AI SDK provider for https://api.ultragpt.pro/v1 and pass its model to the agent.
// npm install @mastra/core @ai-sdk/openai-compatible
import { Agent } from '@mastra/core/agent'
import { createOpenAICompatible } from '@ai-sdk/openai-compatible'

const ultragpt = createOpenAICompatible({ name: 'ultragpt', baseURL: 'https://api.ultragpt.pro/v1', apiKey: process.env.ULTRAGPT_API_KEY })

export const assistant = new Agent({
  name: 'assistant',
  instructions: 'You are a helpful assistant.',
  model: ultragpt('grok-4.7'),
})
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