For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Copy to LLMGithubGo to App
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
DocumentationIntegrationsBuilding Self-Improving AgentsSelf-hosting OpikSDK & API reference
    • Overview
  • Python SDK
    • Reference
    • REST API Client
  • Typescript SDK
    • Overview
    • Opik TS
    • Prompts
    • Opik Query Language (OQL)
  • Rest API
    • Overview
        • PATCHBatch update experiments
        • GETFind experiments
        • POSTCreate experiment
        • POSTCreate experiment items
        • POSTDelete experiment items
        • POSTDelete experiments by id
        • POSTCreate and execute experiment
        • PUTRecord experiment items in bulk
        • GETFind Feedback Score names
        • GETFind experiment groups
        • GETFind experiment groups with aggregations
        • POSTFinish experiments
        • GETGet experiment by id
        • PATCHUpdate experiment by id
        • GETGet experiment item by id
        • POSTStream experiment items
        • POSTStream experiments
LogoLogo
Copy to LLMGithubGo to App
Rest APIAPI ReferenceExperiments

Create and execute experiment

POST
/v1/private/experiments/execute
POST
/api/v1/private/experiments/execute
$curl -X POST http://localhost:5173/api/v1/private/experiments/execute \
> -H "Content-Type: application/json" \
> -d '{
> "dataset_name": "Customer Support Tickets",
> "prompts": [
> {
> "model": "gpt-4",
> "messages": [
> {
> "role": "system",
> "content": {}
> }
> ]
> }
> ],
> "dataset_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
>}'
202Accepted
1{
2 "experiments": [
3 {
4 "experiment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
5 "prompt_index": 0
6 }
7 ],
8 "total_items": 1500
9}
Creates experiments for each prompt variant and asynchronously processes all dataset items
Was this page helpful?
Previous

Record experiment items in bulk

Next
Built with

Request

This endpoint expects an object.
dataset_namestringRequired>=1 character
promptslist of objectsRequired
dataset_idstringRequiredformat: "uuid"
dataset_version_idstringOptionalformat: "uuid"
project_namestringOptional
version_hashstringOptional
prompt_versionslist of objectsOptional

Response

Experiments created and processing started
experimentslist of objects
total_itemsinteger