---
updatedAt: 2026-01-28T20:52:08.000Z
agentTools:
  projectIndex: https://developer.vyasa.com/llms.txt
---

# Call Certara LLM to generate a system message and return the corresponding sources used

For information on what each endpoint parameter does review [Certara Generative AI Parameters](https://developer.vyasa.com/docs/understanding-the-certara-generative-ai-parameters)

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Layar API Documentation",
    "version": "v1.927.2",
    "contact": {
      "name": "Certara AI Support",
      "email": "AI-Support@Certara.com",
      "url": "https://vyasa.readme.io/"
    }
  },
  "servers": [
    {
      "url": "BASE_PATH"
    }
  ],
  "paths": {
    "/layar/gpt/generate": {
      "post": {
        "operationId": "generate",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GptGenerateCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GptGenerateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        },
        "summary": "Call Certara LLM to generate a system message and return the corresponding sources used",
        "tags": [
          "gpt"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "GPT",
      "name": "gpt"
    }
  ],
  "components": {
    "schemas": {
      "GptGenerateResponse": {
        "title": "GptGenerateResponse",
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "sourcesUsed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "documentsUsed": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                }
              }
            }
          },
          "chunksUsed": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "documentId": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "chunkId": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                },
                "paragraphId": {
                  "type": "string"
                },
                "score": {
                  "type": "string"
                },
                "expandedText": {
                  "type": "string"
                },
                "expandedScore": {
                  "type": "string"
                },
                "rerankScore": {
                  "type": "number",
                  "format": "float"
                },
                "vectorScoreContribution": {
                  "type": "number",
                  "format": "float"
                },
                "keywordScoreContribution": {
                  "type": "number",
                  "format": "float"
                },
                "embedder": {
                  "type": "string",
                  "description": "Embedder model name used for this chunk"
                }
              }
            }
          },
          "perplexity": {
            "type": "number",
            "format": "float"
          }
        }
      },
      "GptGenerateCommand": {
        "title": "GptGenerateCommand",
        "type": "object",
        "required": [
          "content",
          "task",
          "messageHistory"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "task": {
            "type": "string"
          },
          "messageHistory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "content": {
                  "type": "string"
                }
              }
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string"
                },
                "documentId": {
                  "type": "string"
                },
                "savedListId": {
                  "type": "string"
                },
                "rawText": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "chunkId": {
                  "type": "string"
                },
                "documentType": {
                  "type": "string"
                }
              }
            }
          },
          "model": {
            "type": "string"
          },
          "max_tokens": {
            "type": "number",
            "format": "integer"
          },
          "temperature": {
            "type": "number",
            "format": "float"
          },
          "top_k": {
            "type": "number",
            "format": "integer"
          },
          "top_p": {
            "type": "number",
            "format": "integer"
          },
          "retriever": {
            "type": "object",
            "properties": {
              "document": {
                "type": "object",
                "properties": {
                  "index_name": {
                    "type": "string",
                    "description": "Optional name for the index, defaults to 'CGPTDocumentStore'."
                  },
                  "lookup_filter": {
                    "type": "string",
                    "description": "Optional filter for document lookup, defaults to 'documentId'."
                  },
                  "reranker": {
                    "type": "boolean",
                    "default": true,
                    "description": "Optional flag to enable or disable reranker, defaults to true."
                  },
                  "reranker_multiplier": {
                    "type": "number",
                    "format": "integer",
                    "description": "Optional flag to set reranker multiplier."
                  },
                  "num_hits": {
                    "type": "integer",
                    "minimum": 10,
                    "description": "Number of hits to return, must be 10 or more."
                  },
                  "heat_ratio": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0.5,
                    "description": "Heat ratio for the query, must be 0.5 or higher."
                  },
                  "enable_sectioning": {
                    "type": "boolean",
                    "default": true,
                    "description": "Optional flag to enable or disable document sectioning, defaults to true."
                  },
                  "search_ratio": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0,
                    "maximum": 1,
                    "description": "Search ratio for the query, must be greater than or equal to 0.0 and less than or equal to 1.0."
                  },
                  "relevance_threshold": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0,
                    "maximum": 1,
                    "description": "Relevance threshold for the query, must be greater than or equal to 0.0 and less than or equal to 1.0."
                  }
                }
              },
              "table": {
                "type": "object",
                "properties": {
                  "index_name": {
                    "type": "string",
                    "description": "Optional name for the index, defaults to 'CGPTDocumentStore'."
                  },
                  "lookup_filter": {
                    "type": "string",
                    "description": "Optional filter for document lookup, defaults to 'documentId'."
                  },
                  "reranker": {
                    "type": "boolean",
                    "default": true,
                    "description": "Optional flag to enable or disable reranker, defaults to true."
                  },
                  "reranker_multiplier": {
                    "type": "number",
                    "format": "integer",
                    "description": "Optional flag to set reranker multiplier."
                  },
                  "num_hits": {
                    "type": "integer",
                    "minimum": 10,
                    "description": "Number of hits to return, must be 10 or more."
                  },
                  "heat_ratio": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0.5,
                    "description": "Heat ratio for the query, must be 0.5 or higher."
                  },
                  "enable_sectioning": {
                    "type": "boolean",
                    "default": false,
                    "description": "Document sectioning is disabled for Tables."
                  },
                  "search_ratio": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0,
                    "maximum": 1,
                    "description": "Search ratio for the query, must be greater than or equal to 0.0 and less than or equal to 1.0."
                  },
                  "relevance_threshold": {
                    "type": "number",
                    "format": "float",
                    "minimum": 0,
                    "maximum": 1,
                    "description": "Relevance threshold for the query, must be greater than or equal to 0.0 and less than or equal to 1.0."
                  }
                }
              }
            }
          },
          "conversation": {
            "type": "object",
            "properties": {
              "chunk_size": {
                "type": "number",
                "format": "float"
              },
              "chunk_overlap": {
                "type": "number",
                "format": "float"
              }
            }
          },
          "summarize": {
            "type": "object",
            "properties": {
              "chunk_size": {
                "type": "number",
                "format": "float"
              },
              "chunk_overlap": {
                "type": "number",
                "format": "float"
              }
            }
          },
          "prompts": {
            "type": "object",
            "properties": {
              "system": {
                "type": "string"
              },
              "summarization": {
                "type": "string"
              },
              "combine": {
                "type": "string"
              }
            }
          },
          "transientData": {
            "type": "boolean"
          },
          "rag_query": {
            "type": "string"
          },
          "frequency_penalty": {
            "type": "number",
            "format": "float"
          },
          "logprobs": {
            "type": "number",
            "format": "integer"
          },
          "llm_seed": {
            "type": "number",
            "format": "integer"
          },
          "rag_skip_enabled": {
            "type": "boolean"
          },
          "searchOperator": {
            "type": "string",
            "description": "Logical operator to combine conditions (AND, OR)",
            "enum": [
              "AND",
              "OR"
            ],
            "default": "AND"
          },
          "searchFilters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "documentId": {
                  "type": "string",
                  "description": "Unique ID of the document.",
                  "example": "AZUqZX4vs4YY7lBzj0ks"
                },
                "documentType": {
                  "type": "string",
                  "enum": [
                    "DOCUMENT",
                    "TABLE"
                  ],
                  "description": "Specifies whether the search should be performed on documents or tables.",
                  "example": "DOCUMENT"
                },
                "searchConditions": {
                  "type": "array",
                  "description": "List of search conditions to filter documents by metadata",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "description": "The metadata field to filter on",
                        "example": "author"
                      },
                      "operator": {
                        "type": "string",
                        "description": "The operator to use for the comparison",
                        "example": "=="
                      },
                      "value": {
                        "type": "string",
                        "description": "The value to compare against",
                        "example": "John Doe"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "oAuth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "CONNECT_API_URL/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oAuth2ClientCredentials": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```