JSON POST request example
POST to https://api.litescrape.com/api/copilot/chat/completions with Content-Type: application/json and your Authorization: Bearer header.
{
"messages": [
{
"role": "user",
"content": "What is the weather near me right now?"
}
],
"model": "copilot",
"stream": false,
"country": "US",
"state": "CA"
}// request reference
Microsoft Copilot Chat Completions (Deprecated) parameters
Send the request fields in a JSON POST body. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.
POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the Litescrape OpenAPI contract.
Total request execution budget in seconds, greater than 0 and at most 180. Supply in the query string for GET or POST. page_timeout cannot extend this budget.
Messages and response
messagesText messages ending in a user message; at most 32,000 characters in total. Roles do not grant instruction priority.
Type object[] · POST JSON only
- Each request starts a fresh conversation. Send prior messages again to include context.
- Supplied roles do not grant instruction priority.
- Minimum items: 1
- Maximum items: 32
messages[].roleRole in the supplied text transcript.
Type string · POST JSON only
systemuserassistant- Required when the parent object is supplied.
messages[].contentNonblank text. Images, tool calls and other content parts are unsupported.
Type string · POST JSON only
- Required when the parent object is supplied.
- Minimum characters: 1
- Maximum characters: 32000
modelService identifier. Microsoft chooses the underlying model.
Type string · GET query or POST JSON · Default copilot
copilotstreamOnly a complete JSON response is supported; stream must be false.
Type boolean · GET query or POST JSON · Default false
false- Streaming, tools, images, sampling settings and token usage are not supported.
Location
countryTwo-letter country or territory code, normalized to uppercase. Sets Copilot's answer and search location to a representative populated place. Omit to use Copilot's default location.
Type string · GET query or POST JSON
Example / input hint: US
AEAFAIALAMAOARASATAUAWAZBABBBDBEBFBGBHBIBJBNBOBQBRBSBTBWBYBZCACDCFCGCHCICKCLCMCNCOCRCVCWCYCZDEDJDKDMDODZECEEEGERESETFIFJFKFMFOFRGAGBGEGGGHGIGLGMGNGQGRGTGUGWGYHKHNHRHTHUIDIEILIMINIQISITJMJOJPKEKGKHKIKRKWKYKZLALBLCLILKLRLSLTLULVLYMAMDMEMGMHMKMLMMMNMOMPMQMRMTMUMVMWMXMYMZNANCNENGNINLNONPNRNUNZOMPAPEPFPGPHPKPLPMPRPSPTPWPYRERORSRURWSASBSCSDSESGSHSISJSKSLSMSNSOSRSSSTSVSYSZTDTGTHTJTLTMTNTOTRTTTVTWTZUAUGUSUYUZVEVNVUWFWSXKYEYTZAZMZW- Supports the 213 country and territory codes listed in the parameter schema.
- Pattern: ^[A-Za-z]{2}$
stateUS postal state code (50 states or DC), normalized to uppercase. Requires country=US. Sets Copilot's location to the state capital.
Type string · GET query or POST JSON
Example / input hint: CA
AKALARAZCACOCTDCDEFLGAHIIAIDILINKSKYLAMAMDMEMIMNMOMSMTNCNDNENHNJNMNVNYOHOKORPARISCSDTNTXUTVAVTWAWIWVWY- Requires country=US. Supports all 50 states and DC.
- Uses the state capital as the representative location for local answers and searches.
- Pattern: ^[A-Za-z]{2}$
// response
Work with the complete JSON response
Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.
This endpoint is deprecated and no longer accepts requests. GET, POST and async submissions return HTTP 410 with error_code: endpoint_deprecated. Rejected requests are not billed.