Code Examples
This page provides practical examples for interacting with the Model Results API using both Python and PHP. The Model info API allows you to retrieve metadata outputs from your Graphite Note model
Python code example
We use the requests library to send a GET request to the /model-info endpoint.
We pass the Authorization header with a valid token.
Since this is a GET request, no body payload is required.
We handle any HTTP exceptions using raise_for_status() and basic exception catching.
PHP Code Example
We use cURL in PHP to send a GET request to the /model-info endpoint.
We set the Authorization header with a bearer token.
No request body is needed.
We parse the JSON response if the request is successful (HTTP 200 OK). Otherwise, we handle the error.
Last updated
Was this helpful?