| 开发者 | imasikur22 |
|---|---|
| 更新时间 | 2026年12月3日 10:52 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
thk_live_…). WordPress AI features that use the AI Client can then route requests through Token Harbor.
Token Harbor is a third-party AI gateway (SaaS). This plugin does not include AI models itself. When you configure an API key and run a request, prompt content and related API fields are sent to Token Harbor at https://tokenharbor.ai/.
Features
covered_by_plans/v1/chat/completions)GET /v1/modelsacth_is_configured()acth_chat_completion( $messages, $args )acth_get_completion_text( $response )acth_list_models()tokenharbor.ai):
wp_ai_client_prompt().https://tokenharbor.ai/.ai-connector-for-token-harbor folder to /wp-content/plugins/, or install the ZIP via Plugins → Add New → Upload Plugin.Settings → Connectors → Token Harbor. That is the WordPress 7 Connectors screen (options-connectors.php).
Settings → Connectors → Token Harbor → Edit. After the API key is connected, use the searchable model field (loaded from Token Harbor).
Sign in at tokenharbor.ai, open the dashboard API keys page, and copy your Universal Key (thk_live_…). See the Quickstart.
https://tokenharbor.ai/v1 (OpenAI-compatible). Filterable via acth_base_url.
```php
$response = acth_chat_completion(
array(
array(
'role' => 'user',
'content' => 'Hello',
),
)
);
if ( ! is_wp_error( $response ) ) {
$text = acth_get_completion_text( $response );
}
```
You can also use the WordPress AI Client with provider ID token_harbor.