Tabular in-context prediction with SAP-RPT-1.6. Unlike /api/forecast, which projects numeric series forward, this endpoint learns from your context rows and fills [PREDICT] cells in your query data.
See API Overview for authentication details and all available endpoints.
Base URL: https://rpt.cloud.sap
Authentication is the same across all endpoints — pass your personal API token in the Authorization header:
Authorization: Bearer YOUR_TOKEN
Obtain and manage tokens in Settings.
{
"rows": [
{
"PRODUCT": "Laptop Pro",
"CATEGORY": "Electronics",
"SALESGROUP": "Enterprise"
},
{
"PRODUCT": "Standing Desk",
"CATEGORY": "Furniture",
"SALESGROUP": "Office"
},
{
"PRODUCT": "Wireless Headset",
"CATEGORY": "Electronics",
"SALESGROUP": "[PREDICT]"
}
],
"index_column": "PRODUCT",
"scenario": "q1-forecast",
"sampler_options": {
"seed": 42
},
"explanations": {
"top_column_scores": 4,
"top_relevant_context_rows": 3
},
"context_mode": "default"
}
rows (required in inline mode): Array of data rows. Each row is an object with column names as keys. For remote CSV files, use the dataSource request shape instead.
[PREDICT] values) used as examples[PREDICT] placeholder values indicating what to predictindex_column (optional): Column name to use as row identifier in the responsescenario (optional): Scenario identifier for telemetry. Has no effect on prediction output. Maximum 100 characters.sampler_options (optional): Sampling configuration applied when context rows exceed the model limit.
sampler_options.seed (optional, integer >= 0): Seed for reproducible random downsampling.explanations (optional): Controls explainability data depth. See Explainability.
explanations.top_column_scores (optional, integer 1–20): Top feature importance scores per query row. Default: 4.explanations.top_relevant_context_rows (optional, integer 1–20): Most relevant context row indices per query row. Default: 3.context_mode (optional, "default" | "deep"): Prediction depth for SAP-RPT-1.6. Default: "default" — best balance of accuracy and latency. "deep" trades higher latency for higher accuracy and only takes effect on the large model variant (sap-rpt-1.6-large) with large context sets (>8000 rows).Note: Target columns and task type (classification vs regression) are auto-detected from the data. Columns containing
[PREDICT]in query rows are automatically identified as prediction targets.
Headers: Beyond the required
Authorizationheader, an optionalX-Predict-Routeheader lets you override how large datasets are routed. See Large Datasets.
| Constraint | Value |
|---|---|
| Min query rows | 1 |
| Max query rows | 512 |
| Min context rows | 2 |
| Max context rows (input) | 100,000 |
| Max target columns | 10 |
| Max columns total | 100 |
| Max cell string length | 1,000 characters |
| Max column name length | 100 characters |
| Max target classes (recommendation) | 256 |
Predict requests are subject to rate limits and short-term throttling (a burst limit that paces rapid-fire requests). Exceeding either returns 429 with a Retry-After header. See Limits & Quotas for exact values, and Errors for the error codes.
Requests with more than 2,048 context rows are routed through the SAP AI Core Tabular Context Registry (TCR) by default when TCR routing is enabled on the server, letting you work with up to 100,000 context rows with context selected at source. In-memory downsampling (Fisher-Yates, direct path) is only used when you explicitly request X-Predict-Route: direct or when TCR routing is disabled. See Large Datasets for how routing works, the X-Predict-Route override, and the response and error differences.
A successful request returns 200. See Response Format for the full response schema, field descriptions, and multi-column prediction examples.
Error responses use the same structured format across all endpoints — see Error Codes for the format and predict-specific application error codes (PRED_*, DS_*).