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 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 v3 OpenAPI contract.
Total request execution budget in seconds, greater than 0 and at most 90. 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.
Response groups include id, object, created, model, choices, citations, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.
Native failures return HTTP 503 with {"error":"Service unavailable"} .
Illustrative success response. Result groups and optional fields depend on upstream content.
{
"id": "chatcmpl-b37bb0f373594442b7ed0d6d640b5b07",
"object": "chat.completion",
"created": 1791612255,
"model": "copilot",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The weather near you in **Sacramento, CA** right now is **clear and around 60–65°F**, with **light south winds around 9 mph** and **humidity between 76–80%**. Visibility is about **10 miles**, and there’s **no precipitation expected**. \n\n---\n\n### 🌤️ **Current Conditions (Sacramento, CA)**\n- **Temperature:** 60–65°F \n- **Sky:** Clear / Mostly clear \n- **Feels Like:** ~58–63°F \n- **Wind:** South 6–10 mph \n- **Humidity:** 76–80% \n- **Visibility:** 10–11 miles \n- **Rain:** 0% chance \n\n---\n\n### 🌡️ **Short-Term Outlook**\n- Overnight lows around **58°F** \n- Tomorrow expected to be **sunny**, with highs near **75°F** \n\n---\n\nIf you want, I can also give you:\n- Hour-by-hour forecast \n- Air quality \n- Weather alerts \n- A 10‑day outlook \n\nWould you like any of those?"
},
"finish_reason": "stop"
}
],
"citations": [
{
"url": "https://www.accuweather.com/en/us/sacramento/95814/current-weather/347627",
"title": "Sacramento, CA Current Weather | AccuWeather"
},
{
"url": "https://forecast.weather.gov/MapClick.php?textField1=38.58&textField2=-121.49",
"title": "National Weather Service"
}
],
"submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token"
}