CompletionPostResponse

SAPCloud PlatformIntegrationArtificial IntelligenceData ManagementAnalyticsApplication DevelopmentEnterprise

Properties

Name Type Description
request_id string ID of the request
intermediate_results object
final_result object
intermediate_failures array List of errors encountered during processing for unsuccessful modules configurations
View JSON Schema on GitHub

JSON Schema

sap-btp-completion-post-response-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-completion-post-response-schema.json",
  "title": "CompletionPostResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-btp-orchestration-openapi.yml#/components/schemas/CompletionPostResponse",
  "type": "object",
  "required": [
    "request_id",
    "final_result",
    "intermediate_results"
  ],
  "properties": {
    "request_id": {
      "description": "ID of the request",
      "type": "string"
    },
    "intermediate_results": {
      "$ref": "#/$defs/ModuleResults"
    },
    "final_result": {
      "$ref": "#/$defs/LLMModuleResult"
    },
    "intermediate_failures": {
      "type": "array",
      "description": "List of errors encountered during processing for unsuccessful modules configurations",
      "items": {
        "$ref": "#/$defs/Error"
      }
    }
  },
  "$defs": {
    "AssistantChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "assistant"
          ]
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        },
        "refusal": {
          "type": "string"
        },
        "tool_calls": {
          "$ref": "#/$defs/MessageToolCalls"
        },
        "reasoning_content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReasoningBlock"
          },
          "description": "Reasoning or thinking content from the model's previous turn.\n"
        }
      },
      "required": [
        "role"
      ]
    },
    "CacheControl": {
      "type": "object",
      "description": "Cache control directive for Anthropic prompt caching. Only applicable to Anthropic Claude models. When set, marks the content block as a cache breakpoint.\n",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ephemeral"
          ]
        },
        "ttl": {
          "type": "string",
          "description": "Time-to-live for the cache entry. Default is \"5m\" (5 minutes). \"1h\" (1 hour) is supported on select models (e.g. Claude Opus 4.5, Haiku 4.5, Sonnet 4.5).\n",
          "enum": [
            "5m",
            "1h"
          ]
        }
      }
    },
    "CacheCreationTokenDetails": {
      "type": "object",
      "description": "Breakdown of cache creation tokens by TTL (Anthropic only).",
      "additionalProperties": false,
      "properties": {
        "ephemeral_5m_input_tokens": {
          "type": "integer",
          "description": "Tokens cached with 5-minute TTL."
        },
        "ephemeral_1h_input_tokens": {
          "type": "integer",
          "description": "Tokens cached with 1-hour TTL."
        }
      }
    },
    "ChatCompletionTokenLogprob": {
      "type": "object",
      "required": [
        "token",
        "logprob"
      ],
      "properties": {
        "token": {
          "type": "string",
          "description": "The token."
        },
        "logprob": {
          "type": "number",
          "format": "float",
          "description": "The log probability of this token."
        },
        "bytes": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int32"
          },
          "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are multi-byte."
        },
        "top_logprobs": {
          "type": "array",
          "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs`.",
          "items": {
            "type": "object",
            "required": [
              "token",
              "logprob"
            ],
            "properties": {
              "token": {
                "type": "string",
                "description": "The token."
              },
              "logprob": {
                "type": "number",
                "format": "float",
                "description": "The log probability of this token."
              },
              "bytes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                },
                "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are multi-byte."
              }
            }
          }
        }
      }
    },
    "ChatMessage": {
      "oneOf": [
        {
          "$ref": "#/$defs/SystemChatMessage"
        },
        {
          "$ref": "#/$defs/UserChatMessage"
        },
        {
          "$ref": "#/$defs/AssistantChatMessage"
        },
        {
          "$ref": "#/$defs/ToolChatMessage"
        },
        {
          "$ref": "#/$defs/DeveloperChatMessage"
        }
      ]
    },
    "ChatMessageContent": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextContent"
          },
          "minItems": 1
        }
      ]
    },
    "ChoiceLogprobs": {
      "type": "object",
      "description": "Log probabilities for the choice.",
      "properties": {
        "content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChatCompletionTokenLogprob"
          },
          "description": "A list of message content tokens with log probability information."
        },
        "refusal": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChatCompletionTokenLogprob"
          },
          "description": "A list of message refusal tokens with log probability information."
        }
      }
    },
    "Citation": {
      "type": "object",
      "required": [
        "title",
        "url"
      ],
      "properties": {
        "ref_id": {
          "type": "integer",
          "description": "Unique identifier for inline citation"
        },
        "title": {
          "type": "string",
          "description": "Title of the citation"
        },
        "url": {
          "type": "string",
          "description": "URL of the citation"
        },
        "start_index": {
          "type": "integer",
          "description": "Start index of the citation in the response text"
        },
        "end_index": {
          "type": "integer",
          "description": "End index of the citation in the response text"
        }
      }
    },
    "DeveloperChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "developer"
          ]
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        }
      },
      "required": [
        "role",
        "content"
      ]
    },
    "Error": {
      "type": "object",
      "required": [
        "request_id",
        "code",
        "message",
        "location"
      ],
      "properties": {
        "request_id": {
          "type": "string"
        },
        "code": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        },
        "location": {
          "type": "string",
          "description": "Where the error occurred"
        },
        "intermediate_results": {
          "$ref": "#/$defs/ModuleResults"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "HTTP headers returned from the failed request attempt"
        }
      }
    },
    "FileContent": {
      "type": "object",
      "required": [
        "file_data"
      ],
      "additionalProperties": false,
      "properties": {
        "file_data": {
          "type": "string",
          "description": "Base64 encoded file content or file URL"
        },
        "filename": {
          "type": "string",
          "description": "Name of the file"
        }
      }
    },
    "GenericModuleResult": {
      "type": "object",
      "description": "Generic module result",
      "required": [
        "message"
      ],
      "properties": {
        "message": {
          "type": "string",
          "description": "Some message created from the module"
        },
        "data": {
          "type": "object",
          "description": "Additional data object from the module"
        }
      }
    },
    "ImageContentUrl": {
      "type": "object",
      "required": [
        "url"
      ],
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string"
        },
        "detail": {
          "type": "string",
          "default": "auto"
        }
      }
    },
    "InputTranslationModuleResult": {
      "type": "object",
      "description": "Input Translation module result",
      "required": [
        "message"
      ],
      "additionalProperties": false,
      "properties": {
        "message": {
          "type": "string",
          "description": "Status message describing the translation operation outcome."
        },
        "data": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "translated_template": {
              "type": "string",
              "deprecated": true
            },
            "translated_template_roles": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "translated_placeholders": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "LLMChoice": {
      "type": "object",
      "required": [
        "index",
        "message",
        "finish_reason"
      ],
      "properties": {
        "index": {
          "type": "integer",
          "description": "Index of the choice"
        },
        "message": {
          "$ref": "#/$defs/ResponseChatMessage"
        },
        "logprobs": {
          "$ref": "#/$defs/ChoiceLogprobs"
        },
        "finish_reason": {
          "type": "string",
          "description": "Reason the model stopped generating tokens. 'stop' if the model hit a natural stop point or a provided stop sequence, 'length' if the maximum token number was reached, 'content_filter' if content was omitted due to a filter enforced by the LLM model provider or the content filtering module"
        },
        "provider_specific_fields": {
          "type": "object",
          "description": "Provider-specific fields not representable in the OpenAI schema. When not identical, includes 'finish_reason' with the raw, unmapped finish reason string from the provider.",
          "additionalProperties": true
        }
      }
    },
    "LLMModuleResult": {
      "type": "object",
      "description": "Output from LLM. Follows the OpenAI spec.",
      "required": [
        "id",
        "object",
        "created",
        "model",
        "choices",
        "usage"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "ID of the response"
        },
        "object": {
          "type": "string",
          "description": "Object type"
        },
        "created": {
          "type": "integer",
          "description": "Unix timestamp"
        },
        "model": {
          "type": "string",
          "description": "Model name"
        },
        "system_fingerprint": {
          "type": "string",
          "description": "System fingerprint"
        },
        "choices": {
          "type": "array",
          "description": "Choices",
          "items": {
            "$ref": "#/$defs/LLMChoice"
          }
        },
        "usage": {
          "$ref": "#/$defs/TokenUsage"
        },
        "citations": {
          "type": "array",
          "description": "List of citations associated with the response.",
          "items": {
            "$ref": "#/$defs/Citation"
          }
        }
      }
    },
    "MessageToolCall": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the tool call."
        },
        "type": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "The type of the tool. Currently, only `function` is supported."
        },
        "function": {
          "type": "object",
          "description": "The function that the model called.",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the function to call."
            },
            "arguments": {
              "type": "string",
              "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."
            }
          },
          "required": [
            "name",
            "arguments"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "function"
      ]
    },
    "MessageToolCalls": {
      "type": "array",
      "description": "The tool calls generated by the model, such as function calls.",
      "items": {
        "$ref": "#/$defs/MessageToolCall"
      }
    },
    "ModuleResults": {
      "description": "Synchronous results of each module.",
      "type": "object",
      "additionalProperties": false,
      "allOf": [
        {
          "$ref": "#/$defs/ModuleResultsBase"
        },
        {
          "type": "object",
          "properties": {
            "llm": {
              "$ref": "#/$defs/LLMModuleResult"
            },
            "output_unmasking": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/LLMChoice"
              }
            }
          }
        }
      ]
    },
    "ModuleResultsBase": {
      "description": "Results of each module of /embeddings endpoint(e.g. input masking).",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "grounding": {
          "$ref": "#/$defs/GenericModuleResult"
        },
        "templating": {
          "$ref": "#/$defs/TemplatingChatMessage"
        },
        "input_translation": {
          "$ref": "#/$defs/InputTranslationModuleResult"
        },
        "input_masking": {
          "$ref": "#/$defs/GenericModuleResult"
        },
        "input_filtering": {
          "$ref": "#/$defs/GenericModuleResult"
        },
        "output_filtering": {
          "$ref": "#/$defs/GenericModuleResult"
        },
        "output_translation": {
          "$ref": "#/$defs/GenericModuleResult"
        }
      }
    },
    "ReasoningBlock": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "content": {
          "type": "string",
          "default": ""
        },
        "signature": {
          "type": "string",
          "default": ""
        }
      }
    },
    "ResponseChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "assistant"
          ]
        },
        "content": {
          "type": "string"
        },
        "refusal": {
          "type": "string"
        },
        "tool_calls": {
          "$ref": "#/$defs/MessageToolCalls"
        },
        "reasoning_content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReasoningBlock"
          },
          "description": "Reasoning or thinking content generated by the model before the final response.\n"
        }
      },
      "required": [
        "role"
      ]
    },
    "SystemChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "system"
          ]
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        }
      },
      "required": [
        "role",
        "content"
      ]
    },
    "TemplatingChatMessage": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/ChatMessage"
      }
    },
    "TextContent": {
      "type": "object",
      "required": [
        "type",
        "text"
      ],
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text"
          ]
        },
        "text": {
          "type": "string"
        },
        "cache_control": {
          "$ref": "#/$defs/CacheControl"
        }
      }
    },
    "TokenUsage": {
      "type": "object",
      "description": "Usage of tokens in the response",
      "properties": {
        "completion_tokens": {
          "type": "integer",
          "description": "Number of tokens in the generated completion."
        },
        "prompt_tokens": {
          "type": "integer",
          "description": "Number of tokens in the prompt."
        },
        "total_tokens": {
          "type": "integer",
          "description": "Total number of tokens used in the request (prompt + completion)."
        },
        "prompt_tokens_details": {
          "type": "object",
          "description": "Details of the prompt tokens.",
          "properties": {
            "audio_tokens": {
              "type": "integer",
              "description": "Audio input tokens present in the prompt."
            },
            "cached_tokens": {
              "type": "integer",
              "description": "Cached tokens present in the prompt."
            },
            "cache_creation_tokens": {
              "type": "integer",
              "description": "Number of tokens written to the cache (Anthropic only).\n"
            },
            "cache_creation_token_details": {
              "$ref": "#/$defs/CacheCreationTokenDetails"
            }
          }
        },
        "completion_tokens_details": {
          "type": "object",
          "description": "Breakdown of tokens used in a completion.",
          "properties": {
            "accepted_prediction_tokens": {
              "type": "integer",
              "description": "When using Predicted Outputs, the number of tokens in the\nprediction that appeared in the completion.\n"
            },
            "audio_tokens": {
              "type": "integer",
              "description": "Audio input tokens generated by the model."
            },
            "reasoning_tokens": {
              "type": "integer",
              "description": "Tokens generated by the model for reasoning."
            },
            "rejected_prediction_tokens": {
              "type": "integer",
              "description": "When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.\n"
            }
          }
        }
      },
      "required": [
        "completion_tokens",
        "prompt_tokens",
        "total_tokens"
      ]
    },
    "ToolChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "tool"
          ]
        },
        "tool_call_id": {
          "type": "string"
        },
        "content": {
          "$ref": "#/$defs/ChatMessageContent"
        }
      },
      "required": [
        "role",
        "content",
        "tool_call_id"
      ]
    },
    "UserChatMessage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "content": {
          "$ref": "#/$defs/UserChatMessageContent"
        },
        "role": {
          "type": "string",
          "enum": [
            "user"
          ]
        }
      },
      "required": [
        "content",
        "role"
      ]
    },
    "UserChatMessageContent": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserChatMessageContentItem"
          },
          "minItems": 1
        }
      ]
    },
    "UserChatMessageContentItem": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text",
            "image_url",
            "file"
          ]
        },
        "text": {
          "type": "string"
        },
        "image_url": {
          "$ref": "#/$defs/ImageContentUrl"
        },
        "file": {
          "$ref": "#/$defs/FileContent"
        },
        "cache_control": {
          "$ref": "#/$defs/CacheControl"
        }
      },
      "required": [
        "type"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sap-btp-completion-post-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.