AI Endpoints API
The canonical documentation lists GPT-3.5 Turbo, GPT-4 Turbo, and GPT-4o as the built-in model choices. The filters below override the request model and provider; check the installed integration and provider for currently available choices.
These filters require the separate breakdance-ai integration/request handlers. They do not install it or configure external MCP agents.
Contracts
| Filter | Arguments | Return |
|---|---|---|
breakdance_ai_api_endpoint |
$origin: service base URL |
A base URL string accepted by the integration's client. The source default is https://api.openai.com. |
breakdance_ai_model |
$modelVersion, $savedModel |
Model identifier string for the request. Register with accepted arguments 2 to inspect both. |
breakdance_ai_enabled |
$enabled |
Boolean controlling the builder integration's enabled state. Other permission and settings checks may also disable it. |
The endpoint is a service origin; the client builds paths and uses its configured key. Replacements must support its authentication, request, response, and streaming formats.
Disable the Integration
add_filter('breakdance_ai_enabled', '__return_false', 100);
Agent connections use separate Agents & MCP settings.
Override the Model
add_filter('breakdance_ai_model', function ($modelVersion, $savedModel) {
if (!defined('ACME_WRITING_MODEL') || !ACME_WRITING_MODEL) {
return $modelVersion;
}
return ACME_WRITING_MODEL;
}, 10, 2);
Define ACME_WRITING_MODEL as an identifier supported by the actual service and request format. This changes requests, not picker labels/choices.
Use Another Provider
The endpoint filter replaces the service base URL. The canonical example uses OpenRouter:
add_filter('breakdance_ai_api_endpoint', function ($url) {
return 'https://openrouter.ai/api';
});
add_filter('breakdance_ai_model', function ($modelVersion, $savedModel) {
return 'anthropic/claude-3.5-sonnet';
}, 10, 2);
The model ID above reproduces the original documented example. Choose an identifier currently offered by your provider; the example does not imply that this older model remains available. The original OpenAI model example uses the same filter to return 'gpt-4'.
- Create an API key with the provider you selected, and ensure the account can use your chosen model. Some models require credits.
- In WordPress, open Breakdance > Settings > AI Assistant.
- Paste that provider's key into OpenAI API Key. Breakdance uses this saved key for the overridden endpoint too.
- Run an AI request and inspect the browser's developer console and the provider's usage dashboard to confirm the endpoint and model work.
These filters do not update the labels or model information displayed on the AI Assistant settings screen. A compatible provider must support the request format used by the installed integration.
See the canonical AI endpoint documentation.
Breakdance officially supports OpenAI and the model choices supplied with Breakdance. Results and compatibility with other providers or models are not guaranteed.