curl --request POST \
--url https://sandbox.rcintell.com/v1/agents/medical-necessity \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"clinical_notes": "Patient has severe osteoarthritis of right knee, failed conservative treatment.",
"cpt_code": "27447",
"dx_codes": [
"M17.11"
],
"query": "Is total knee arthroplasty medically necessary?"
}
'import requests
url = "https://sandbox.rcintell.com/v1/agents/medical-necessity"
payload = {
"clinical_notes": "Patient has severe osteoarthritis of right knee, failed conservative treatment.",
"cpt_code": "27447",
"dx_codes": ["M17.11"],
"query": "Is total knee arthroplasty medically necessary?"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clinical_notes: 'Patient has severe osteoarthritis of right knee, failed conservative treatment.',
cpt_code: '27447',
dx_codes: ['M17.11'],
query: 'Is total knee arthroplasty medically necessary?'
})
};
fetch('https://sandbox.rcintell.com/v1/agents/medical-necessity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rcintell.com/v1/agents/medical-necessity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clinical_notes' => 'Patient has severe osteoarthritis of right knee, failed conservative treatment.',
'cpt_code' => '27447',
'dx_codes' => [
'M17.11'
],
'query' => 'Is total knee arthroplasty medically necessary?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rcintell.com/v1/agents/medical-necessity"
payload := strings.NewReader("{\n \"clinical_notes\": \"Patient has severe osteoarthritis of right knee, failed conservative treatment.\",\n \"cpt_code\": \"27447\",\n \"dx_codes\": [\n \"M17.11\"\n ],\n \"query\": \"Is total knee arthroplasty medically necessary?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.rcintell.com/v1/agents/medical-necessity")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clinical_notes\": \"Patient has severe osteoarthritis of right knee, failed conservative treatment.\",\n \"cpt_code\": \"27447\",\n \"dx_codes\": [\n \"M17.11\"\n ],\n \"query\": \"Is total knee arthroplasty medically necessary?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rcintell.com/v1/agents/medical-necessity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clinical_notes\": \"Patient has severe osteoarthritis of right knee, failed conservative treatment.\",\n \"cpt_code\": \"27447\",\n \"dx_codes\": [\n \"M17.11\"\n ],\n \"query\": \"Is total knee arthroplasty medically necessary?\"\n}"
response = http.request(request)
puts response.read_body{
"agent_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Submit medical necessity check
Submit a medical necessity evaluation to the AI agent.
Evaluates whether a procedure (CPT) is medically necessary given the diagnosis codes (ICD-10) and clinical context. Checks LCD/NCD coverage determinations.
curl --request POST \
--url https://sandbox.rcintell.com/v1/agents/medical-necessity \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"clinical_notes": "Patient has severe osteoarthritis of right knee, failed conservative treatment.",
"cpt_code": "27447",
"dx_codes": [
"M17.11"
],
"query": "Is total knee arthroplasty medically necessary?"
}
'import requests
url = "https://sandbox.rcintell.com/v1/agents/medical-necessity"
payload = {
"clinical_notes": "Patient has severe osteoarthritis of right knee, failed conservative treatment.",
"cpt_code": "27447",
"dx_codes": ["M17.11"],
"query": "Is total knee arthroplasty medically necessary?"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
clinical_notes: 'Patient has severe osteoarthritis of right knee, failed conservative treatment.',
cpt_code: '27447',
dx_codes: ['M17.11'],
query: 'Is total knee arthroplasty medically necessary?'
})
};
fetch('https://sandbox.rcintell.com/v1/agents/medical-necessity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rcintell.com/v1/agents/medical-necessity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clinical_notes' => 'Patient has severe osteoarthritis of right knee, failed conservative treatment.',
'cpt_code' => '27447',
'dx_codes' => [
'M17.11'
],
'query' => 'Is total knee arthroplasty medically necessary?'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rcintell.com/v1/agents/medical-necessity"
payload := strings.NewReader("{\n \"clinical_notes\": \"Patient has severe osteoarthritis of right knee, failed conservative treatment.\",\n \"cpt_code\": \"27447\",\n \"dx_codes\": [\n \"M17.11\"\n ],\n \"query\": \"Is total knee arthroplasty medically necessary?\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.rcintell.com/v1/agents/medical-necessity")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clinical_notes\": \"Patient has severe osteoarthritis of right knee, failed conservative treatment.\",\n \"cpt_code\": \"27447\",\n \"dx_codes\": [\n \"M17.11\"\n ],\n \"query\": \"Is total knee arthroplasty medically necessary?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rcintell.com/v1/agents/medical-necessity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clinical_notes\": \"Patient has severe osteoarthritis of right knee, failed conservative treatment.\",\n \"cpt_code\": \"27447\",\n \"dx_codes\": [\n \"M17.11\"\n ],\n \"query\": \"Is total knee arthroplasty medically necessary?\"\n}"
response = http.request(request)
puts response.read_body{
"agent_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Body
Submit a medical necessity check to the AI agent.
CPT code to evaluate
"27447"
The question or task for the agent
8000Shared secret for HMAC-SHA256 of the raw JSON body. We send X-RCI-Signature: sha256=. Do not send this on poll.
8 - 128HTTPS URL to POST when the job completes or fails. There is no POST /v1/webhooks registry — this is the only push. Pair with callback_secret so we send X-RCI-Signature.
"https://yourapp.com/webhooks/rci-agent"
Facility CCN to enrich the query with knowledge layer data
"170001"
Relevant clinical notes excerpt
Additional context key-value pairs passed to the agent
ICD-10 diagnosis codes supporting necessity
["M17.11"]
Response
Job accepted — poll /agents/jobs/{job_id} for result