DOC-API-MODEL-schema-1ia0h761lm#overview
CostDetails
Breakdown of model-provider cost. When the customer supplies the provider key, usage.cost is zero and upstream_inference_cost reports the provider spend, split into prompt and completion components.
Type-reference view: API Schema 9frhv4euve, API Schema 9ftjkkjhfa. Request and response views describe this type; they do not declare an endpoint.
Meaning and usage
Section ID: DOC-API-MODEL-schema-1ia0h761lm#meaning
See the definition above.
Usage profiles
Section ID: DOC-API-MODEL-schema-1ia0h761lm#fields
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-1ia0h761lm#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1ia0h761lm#request-field-upstreaminferencecostupstreamInferenceCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Total upstream provider cost (USD) on BYOK routes. |
Section ID: DOC-API-MODEL-schema-1ia0h761lm#request-field-upstreaminferencepromptcostupstreamInferencePromptCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Upstream cost attributed to prompt tokens (USD). |
Section ID: DOC-API-MODEL-schema-1ia0h761lm#request-field-upstreaminferencecompletioncostupstreamInferenceCompletionCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Upstream cost attributed to completion tokens (USD). |
In responses
Section ID: DOC-API-MODEL-schema-1ia0h761lm#response
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1ia0h761lm#field-upstreaminferencecostSection ID: DOC-API-MODEL-schema-1ia0h761lm#response-field-upstreaminferencecostupstreamInferenceCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Total upstream provider cost (USD) on BYOK routes. |
Section ID: DOC-API-MODEL-schema-1ia0h761lm#field-upstreaminferencepromptcostSection ID: DOC-API-MODEL-schema-1ia0h761lm#response-field-upstreaminferencepromptcostupstreamInferencePromptCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Upstream cost attributed to prompt tokens (USD). |
Section ID: DOC-API-MODEL-schema-1ia0h761lm#field-upstreaminferencecompletioncostSection ID: DOC-API-MODEL-schema-1ia0h761lm#response-field-upstreaminferencecompletioncostupstreamInferenceCompletionCost | number (double) or string (NaN, Infinity, -Infinity) | Optional | Upstream cost attributed to completion tokens (USD). |
Where used
Section ID: DOC-API-MODEL-schema-1ia0h761lm#where-used
| Reference | Relationship |
|---|---|
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Append a message without generating | POST /api/v1/llm/append-message |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| ReceiveMessageRequest | API JSON uses JSON field names (camelCase). |
| ClientToolDispatch | API JSON uses JSON field names (camelCase). |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-1ia0h761lm