API Documentation

1. Generate Response

Endpoint

/api/generate

Method

POST

Description

Proxies non-streaming requests to the downstream service to generate a response based on the given model and prompt.

Request Body

            {
                "model": "string",
                "prompt": "string"
            }
            

Response

Returns the generated response in JSON format.

2. Generate Streaming Response

Endpoint

/api/generate-stream

Method

POST

Description

Proxies streaming requests to the downstream service to generate a response based on the given model and prompt.

Request Body

            {
                "model": "string",
                "prompt": "string"
            }
            

Response

Streams the generated response.

3. Get Queue Status

Endpoint

/api/queue-status

Method

GET

Description

Returns the current position of the client in the queue and the total number of clients in the queue.

Response

            {
                "position": "number",
                "total": "number"
            }
            

4. Landing Page

Endpoint

/

Method

GET

Description

Serves the landing page for the application.