> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Modelle, Tools und Konten

> Mit ServerRpc des Laravel Copilot SDK listen Sie Modelle und Tools auf und prüfen Kontingente und Authentifizierungsstatus von Konten.

## Modelle, Tools und Konten

Geltungsbereich: ServerRpc (serverweite Operationen, die an den Client gebunden sind)

Eine Übersicht über RPC und die Liste aller RPC-Seiten finden Sie unter [RPC](https://kawax.biz/de/packages/laravel-copilot-sdk/rpc.md).

```php theme={null}
Copilot::client()->rpc()->ping();

// models
Copilot::client()->rpc()->models()->list();
// Mit einem GitHub-Token pro Session abrufen
Copilot::client()->rpc()->models()->list(new ModelsListRequest(gitHubToken: $token));
// Einheit der Token-Preise der Modelle abrufen. Dieselben Kontoauswahl-Informationen wie bei models.list übergeben
$priceUnits = Copilot::client()->rpc()->models()->listTokenPriceUnits(
    new ModelsListTokenPriceUnitsRequest(gitHubToken: $token),
);
// $priceUnits->units enthält modelId und unit vom Typ TokenPriceUnit|string
foreach ($priceUnits->units as $priceUnit) {
    if ($priceUnit->unit === TokenPriceUnit::NanoAiu) {
        // Zur Umrechnung von nano-AIU in AI Credits durch 1,000,000,000 teilen
    }
}
// Integrierter Modellkatalog
Copilot::client()->rpc()->models()->getBuiltInCatalog();

// tools
Copilot::client()->rpc()->tools()->list();

// account
Copilot::client()->rpc()->account()->getQuota();
// Mit einem GitHub-Token pro Session abrufen
Copilot::client()->rpc()->account()->getQuota(new AccountGetQuotaRequest(gitHubToken: $token));

// Absolute URL aus dem konfigurierten GitHub-Hostnamen auflösen (keine Authentifizierung erforderlich)
$hostUrl = Copilot::client()->rpc()->account()->getHostUrl([
    'copilotGhHost' => 'github.example.com',
])->url;

// Authentifizierte Identity ohne Anmeldedaten bei Copilot Free registrieren
$enrollment = Copilot::client()->rpc()->account()->subscribeCopilotFree([
    'identity' => [
        'type' => 'token',
        'host' => 'https://github.com',
        'login' => 'octocat',
    ],
]);
// $enrollment->kind / $enrollment->status / $enrollment->message

// tools largeOutput (experimental: abgelaufene große Tool-Ausgaben bereinigen)
Copilot::client()->rpc()->tools()->largeOutput()->cleanup();
```


## Related topics

- [ServerRpc-Übersicht](https://kawax.biz/de/packages/laravel-copilot-sdk/rpc/server-overview.md)
- [RPC (Remote Procedure Call)](https://kawax.biz/de/packages/laravel-copilot-sdk/rpc.md)
- [Tools](https://kawax.biz/de/packages/laravel-copilot-sdk/tools.md)
- [Modelle](https://kawax.biz/de/packages/laravel-copilot-sdk/models.md)
- [Laravels neues Ökosystem zur Code-Analyse – surveyor / ranger / roster](https://kawax.biz/de/blog/laravel-ecosystem-analysis.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.