!pip install vlmrun
from vlmrun.client import VLMRun
from vlmrun.client.types import PredictionResponse
client = VLMRun(api_key="<VLMRUN_API_KEY>")
response: list[PredictionResponse] = client.predictions.list()
import { VlmRun } from "vlmrun";
const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });
const response = await client.predictions.list();
console.log(response);
[
{
"usage": {
"elements_processed": 123,
"element_type": "image",
"credits_used": 123,
"steps": 123,
"message": "<string>",
"duration_seconds": 0,
"service_tier": "<string>",
"mode_multiplier": 123,
"standard_cost_dollars": 123,
"cost_dollars": 123,
"savings_dollars": 123
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"response": "<unknown>",
"status": "pending",
"domain": "<string>",
"fallback": false,
"error": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Generate
Get Predictions
Get all predictions uploaded by the user with pagination.
GET
/
v1
/
predictions
!pip install vlmrun
from vlmrun.client import VLMRun
from vlmrun.client.types import PredictionResponse
client = VLMRun(api_key="<VLMRUN_API_KEY>")
response: list[PredictionResponse] = client.predictions.list()
import { VlmRun } from "vlmrun";
const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });
const response = await client.predictions.list();
console.log(response);
[
{
"usage": {
"elements_processed": 123,
"element_type": "image",
"credits_used": 123,
"steps": 123,
"message": "<string>",
"duration_seconds": 0,
"service_tier": "<string>",
"mode_multiplier": 123,
"standard_cost_dollars": 123,
"cost_dollars": 123,
"savings_dollars": 123
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"response": "<unknown>",
"status": "pending",
"domain": "<string>",
"fallback": false,
"error": "<string>"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get the list of predictions for the current user.
!pip install vlmrun
from vlmrun.client import VLMRun
from vlmrun.client.types import PredictionResponse
client = VLMRun(api_key="<VLMRUN_API_KEY>")
response: list[PredictionResponse] = client.predictions.list()
import { VlmRun } from "vlmrun";
const client = new VlmRun({ apiKey: "<VLMRUN_API_KEY>" });
const response = await client.predictions.list();
console.log(response);
Authorizations
Query Parameters
Response
Successful Response
The usage metrics for the request.
Hide child attributes
Hide child attributes