!pip install vlmrun
from vlmrun.client import VLMRun
from vlmrun.client.types import PredictionResponse
client = VLMRun(api_key="<VLMRUN_API_KEY>")
response: PredictionResponse = client.predictions.get("<prediction_id>")
{
"usage": {
"elements_processed": 123,
"element_type": "image",
"credits_used": 123,
"steps": 123,
"message": "<string>",
"duration_seconds": 0
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"response": "<any>",
"status": "pending",
"domain": "<string>"
}
Get prediction JSON by request ID.
!pip install vlmrun
from vlmrun.client import VLMRun
from vlmrun.client.types import PredictionResponse
client = VLMRun(api_key="<VLMRUN_API_KEY>")
response: PredictionResponse = client.predictions.get("<prediction_id>")
{
"usage": {
"elements_processed": 123,
"element_type": "image",
"credits_used": 123,
"steps": 123,
"message": "<string>",
"duration_seconds": 0
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"response": "<any>",
"status": "pending",
"domain": "<string>"
}
!pip install vlmrun
from vlmrun.client import VLMRun
from vlmrun.client.types import PredictionResponse
client = VLMRun(api_key="<VLMRUN_API_KEY>")
response: PredictionResponse = client.predictions.get("<prediction_id>")
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successful Response
Base prediction response for all API responses.