Skip to main content
POST
/
api
/
v1
/
queries
Create a query
curl --request POST \
  --url https://api.webless.ai/api/v1/queries \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "What does Webless do?"
}
'
{
  "responses": [
    {
      "id": "<string>",
      "link": "<string>",
      "score": 123,
      "image": "<string>",
      "title": "<string>",
      "description": "<string>",
      "label": [
        "<string>"
      ],
      "gated": 123,
      "highlight_list": [
        "<string>"
      ]
    }
  ],
  "marketing_message": {
    "message": "<string>",
    "link": "<string>"
  },
  "highlights": [
    {
      "text": "<string>",
      "url": "<string>"
    }
  ],
  "sales_cta": {
    "text": "<string>",
    "url": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.webless.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use the same requestId and sessionId for queries, the WebSocket summary stream, cta-selection, and suggestions for a single user action.

Body

application/json
query
string
required

The user query.

Example:

"What does Webless do?"

company
string
default:sigma

The company identifier provisioned by Webless.

Example:

"YOUR_COMPANY"

version
enum<string>
default:published

Runtime package pointer. Omit this field or use published for production traffic. Use unpublished only when testing an unpublished runtime package.

Available options:
published,
unpublished
user_persona_id
string | null
tone
string | null
requestId
string

Correlation ID for the request.

Example:

"1f7c5f74-7b9e-4a0a-9b7d-4e3e2a5e3b60"

sessionId
string

Stable session ID for the user session.

Example:

"a1c2d3e4-1111-2222-3333-444455556666"

num_highlights
integer
default:0

Maximum number of highlights to return.

model
string
default:gpt
number_of_results
integer
default:6

Maximum number of responses to return.

number_of_tiles
integer
default:6

Maximum number of tiles to consider.

summary_word_limit
integer
default:120
bullet_point_word_limit
integer
default:25
headline_word_limit
integer
default:15
token
string | null
use_hyde
boolean
default:false
use_history
boolean
default:false
use_hybrid
boolean
default:false
frontend_labels
string[] | null
is_private_session
boolean
default:false

When true, the request is not written to session history or analytics logs.

Response

Query result

responses
object[]
marketing_message
highlights
object[]
sales_cta