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

# OpenAI-compatible API

This endpoint supports various OpenAI (OAI) API operations such as chat completions (including `v1/completions` and 
`v1/chat/completions`), embeddings, and more.
\
\
For all requests that require the "model" parameter in the request body, it match one of the available models
returned by the `/oai/v1/models` endpoint.
\
\
For more details of each specific endpoint, see <https://platform.openai.com/docs/api-reference>.
\

## Notes
Requests are **not** proxied to, or served by, OpenAI. This endpoint simply utilizes the same input and 
response formats defined in the OpenAI API specification. As a result, they do **not** require any special/different
authentication.
\
\
There are slight differences in the response payloads between Layar and OAI. For example: If requested, OAI returns
`usage` info to track costs per token. We do not return this field or track tokens in this way. There are some other
OAI-specific fields that refer to other pieces of the OAI stack; we do not mimic these.
\
\
The intended use for this functionality is primarily to support completions, embeddings, and models endpoints to 
facilitate utilizing Layar for workflows that may have been previously built against OAI.


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Layar API Documentation",
    "version": "1.927.8",
    "contact": {
      "name": "Certara AI Support",
      "email": "AI-Support@Certara.com",
      "url": "https://vyasa.readme.io/"
    }
  },
  "servers": [
    {
      "url": "BASE_PATH"
    }
  ],
  "paths": {
    "/layar/oai/{path}": {
      "post": {
        "summary": "OpenAI-compatible API",
        "description": "This endpoint supports various OpenAI (OAI) API operations such as chat completions (including `v1/completions` and \n`v1/chat/completions`), embeddings, and more.\n\\\n\\\nFor all requests that require the \"model\" parameter in the request body, it match one of the available models\nreturned by the `/oai/v1/models` endpoint.\n\\\n\\\nFor more details of each specific endpoint, see <https://platform.openai.com/docs/api-reference>.\n\\\n\n## Notes\nRequests are **not** proxied to, or served by, OpenAI. This endpoint simply utilizes the same input and \nresponse formats defined in the OpenAI API specification. As a result, they do **not** require any special/different\nauthentication.\n\\\n\\\nThere are slight differences in the response payloads between Layar and OAI. For example: If requested, OAI returns\n`usage` info to track costs per token. We do not return this field or track tokens in this way. There are some other\nOAI-specific fields that refer to other pieces of the OAI stack; we do not mimic these.\n\\\n\\\nThe intended use for this functionality is primarily to support completions, embeddings, and models endpoints to \nfacilitate utilizing Layar for workflows that may have been previously built against OAI.\n",
        "operationId": "oaiProxy",
        "tags": [
          "oai"
        ],
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "description": "The OpenAI API compliant path (eg, \"v1/chat/completions\", or \"v1/embeddings\")",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response from the OpenAI-compatible API",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad request, such as missing or invalid model parameter"
          },
          "500": {
            "description": "Server error"
          }
        }
      }
    }
  },
  "tags": [
    {
      "description": "OpenAI-compatible API",
      "name": "oai"
    }
  ],
  "components": {
    "securitySchemes": {
      "oAuth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "CONNECT_API_URL/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "oAuth2ClientCredentials": []
    }
  ]
}
```