openapi: 3.1.0
info:
title: API Reference subpackage_actions subpackage_prompts.subpackage_prompts/runs API
version: 1.0.0
servers:
- url: http://localhost:8000
tags:
- name: subpackage_prompts.subpackage_prompts/runs
paths:
/api/prompts/{prompt_id}/versions/{version_id}/inference-runs:
get:
operationId: list
summary: ✨ Get inference run info
description: " \n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n \n
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ModelRun'
post:
operationId: create
summary: ✨ Run prompt inference
description: "\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n
\ncurl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ModelRun'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ModelRunRequest'
/api/prompts/{prompt_id}/versions/{version_id}/inference-runs/{inference_run_id}/cancel:
post:
operationId: cancel
summary: ✨ Cancel Inference Run API
description: "\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n
\ncurl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/CancelModelRunResponse'
components:
schemas:
ProjectSubsetEnum:
type: string
enum:
- All
- HasGT
- Sample
- Custom
description: '* `All` - All
* `HasGT` - HasGT
* `Sample` - Sample
* `Custom` - Custom'
title: ProjectSubsetEnum
ApiPromptsPromptIdVersionsVersionIdInferenceRunsGetParametersProjectSubset:
type: string
enum:
- All
- HasGT
- Sample
title: ApiPromptsPromptIdVersionsVersionIdInferenceRunsGetParametersProjectSubset
ModelRunRequest:
type: object
properties:
filters_json:
oneOf:
- description: Any type
- type: 'null'
description: DM filter group for Filtered subset. Stored for display/re-run purposes.
job_id:
type:
- string
- 'null'
description: Job ID for inference job for a ModelRun e.g. Adala job ID
only_missing_predictions:
type: boolean
default: false
description: When true, only tasks without successful predictions for this prompt version are submitted for inference.
organization:
type:
- integer
- 'null'
predictions_updated_at:
type:
- string
- 'null'
format: date-time
project:
type: integer
project_subset:
$ref: '#/components/schemas/ProjectSubsetEnum'
sample_subset_size:
type:
- integer
- 'null'
description: Custom sample size for Sample subset. Uses PROMPTER_SAMPLE_SUBSET_SIZE if not set.
total_correct_predictions:
type:
- integer
- 'null'
total_predictions:
type:
- integer
- 'null'
total_tasks:
type:
- integer
- 'null'
required:
- project
title: ModelRunRequest
ModelRunStatusEnum:
type: string
enum:
- Pending
- InProgress
- Completed
- Failed
- Canceled
description: '* `Pending` - Pending
* `InProgress` - InProgress
* `Completed` - Completed
* `Failed` - Failed
* `Canceled` - Canceled'
title: ModelRunStatusEnum
UserSimple:
type: object
properties:
avatar:
type: string
email:
type: string
format: email
first_name:
type: string
id:
type: integer
last_name:
type: string
username:
type: string
required:
- avatar
- id
- username
description: 'A ModelSerializer that takes additional arguments for
"fields", "omit" and "expand" in order to
control which fields are displayed, and whether to replace simple
values with complex, nested serializations'
title: UserSimple
CancelModelRunResponse:
type: object
properties:
detail:
type: string
required:
- detail
title: CancelModelRunResponse
ModelRun:
type: object
properties:
completed_at:
type:
- string
- 'null'
format: date-time
created_at:
type: string
format: date-time
created_by:
$ref: '#/components/schemas/UserSimple'
filters_json:
oneOf:
- description: Any type
- type: 'null'
description: DM filter group for Filtered subset. Stored for display/re-run purposes.
id:
type: integer
job_id:
type:
- string
- 'null'
description: Job ID for inference job for a ModelRun e.g. Adala job ID
organization:
type:
- integer
- 'null'
parent_model:
type: integer
predictions_updated_at:
type:
- string
- 'null'
format: date-time
project:
type: integer
project_subset:
$ref: '#/components/schemas/ProjectSubsetEnum'
sample_subset_size:
type:
- integer
- 'null'
description: Custom sample size for Sample subset. Uses PROMPTER_SAMPLE_SUBSET_SIZE if not set.
source_model_run:
type:
- integer
- 'null'
status:
$ref: '#/components/schemas/ModelRunStatusEnum'
task_ids:
oneOf:
- description: Any type
- type: 'null'
description: List of task IDs for Custom subset re-evaluation.
total_correct_predictions:
type:
- integer
- 'null'
total_predictions:
type:
- integer
- 'null'
total_tasks:
type:
- integer
- 'null'
triggered_at:
type:
- string
- 'null'
format: date-time
required:
- completed_at
- created_at
- created_by
- id
- parent_model
- project
- source_model_run
- status
- task_ids
- triggered_at
title: ModelRun
securitySchemes:
Token:
type: apiKey
in: header
name: Authorization
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'