Get a model
GET
/api/models/{modelId}
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.langparse.dev/api/models/invoice");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "X-Api-Key: <X-Api-Key>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.langparse.dev/api/models/invoice"), Headers = { { "X-Api-Key", "<X-Api-Key>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.langparse.dev/api/models/invoice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<X-Api-Key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.langparse.dev/api/models/invoice")) .header("X-Api-Key", "<X-Api-Key>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.langparse.dev/api/models/invoice") .get() .addHeader("X-Api-Key", "<X-Api-Key>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.langparse.dev/api/models/invoice', headers: {'X-Api-Key': '<X-Api-Key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.langparse.dev/api/models/invoice';const options = {method: 'GET', headers: {'X-Api-Key': '<X-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://api.langparse.dev/api/models/invoice") .get() .addHeader("X-Api-Key", "<X-Api-Key>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.langparse.dev/api/models/invoice";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("X-Api-Key", "<X-Api-Key>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url https://api.langparse.dev/api/models/invoice \ --header 'X-Api-Key: <X-Api-Key>'wget --quiet \ --method GET \ --header 'X-Api-Key: <X-Api-Key>' \ --output-document \ - https://api.langparse.dev/api/models/invoiceFetch a single model by its id or its friendly key/slug, including its full field schema, extraction strategy, validation rule, and output tags.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”modelId
required
string
Model id (mdl_…) or friendly key/slug.
Example
invoiceResponses
Section titled “Responses”The model.
Media typeapplication/json
object
data
required
A model (schema + strategy + output tags). Own key id; slug is a friendly, unique-per-org handle accepted anywhere the id is.
object
key
additional properties
any
Examplegenerated
{ "data": {}}Missing or invalid API key.
Media typeapplication/json
Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.
object
statusCode
integer
statusMessage
string
Example
{ "statusCode": 404, "statusMessage": "Document not found"}Model not found.
Media typeapplication/json
Error response. statusCode mirrors the HTTP status; statusMessage is human-readable.
object
statusCode
integer
statusMessage
string
Example
{ "statusCode": 404, "statusMessage": "Document not found"}