sf-service-models-api

Installation
SKILL.md

Models API and Trust Layer Integration

Use This Skill When

  • Designing or building Apex-side GenAI calls through aiplatform.ModelsAPI (Models REST API behind the Einstein Trust Layer).
  • Selecting which foundation model to route to for a given Service Cloud workflow.
  • Defining prompt structure, structured-output contracts, and response-parsing strategy.
  • Planning operational controls: PII handling, retries, latency budgets, governor-limit safety, and audit.

Quick Start (Code Patterns)

These four patterns cover ~90% of Models API integrations. Copy, adapt, ship. For full request/response shapes, model catalog, and retry/streaming patterns, see reference.md.

1. Apex service class skeleton

Centralize every GenAI call through one service class so prompt versioning, model swaps, and telemetry happen in one place. Use a constant for the model name; expose a test seam for mocking.

public with sharing class CaseSummarizer {
Installs
1
First Seen
6 days ago