{"openapi":"3.1.0","info":{"title":"Maniac Inference Gateway API","description":"OpenAI-compatible inference gateway with Maniac-specific endpoints forcontainers, files, models, datasets, evaluation, and optimization.","version":"1.0.0","termsOfService":"https://maniac.ai/terms","contact":{"name":"Maniac Support","email":"support@maniac.ai","url":"https://maniac.ai"}},"servers":[{"url":"https://platform.maniac.ai","description":"The Maniac API"}],"paths":{"/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Create a chat completion","description":"Create a chat completion using the specified model.\n\nSupports both streaming and non-streaming responses and is compatible with\nOpenAI's chat completions API. Use a container slug (`maniac:<container>`)\nor an external slug (e.g. `openai/gpt-4o`). `/` and `:` are treated\nequivalently on input.","operationId":"chat_completions_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatReq"}}}},"responses":{"200":{"description":"Server-Sent Events stream for streaming responses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRes"}},"text/event-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Chat"],"summary":"List chat completions","description":"List chat completions captured in telemetry, scoped to the authenticated project.","operationId":"chat_completions_list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"container","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container"}},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Order"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Metadata"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatListRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions/{completion_id}":{"get":{"tags":["Chat"],"summary":"Get a chat completion","description":"Fetch a single chat completion by id within the authenticated project.","operationId":"chat_completions_retrieve","parameters":[{"name":"completion_id","in":"path","required":true,"schema":{"type":"string","title":"Completion Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResRelaxed-Output"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions/register":{"post":{"tags":["Chat"],"summary":"Register chat completion examples","description":"Register completed chat examples for evaluation and analytics.\n\nThis endpoint accepts input/output pairs and stores them for later analysis,\nwhile aggregating usage metrics for reporting.","operationId":"chat_completions_register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/traces":{"get":{"tags":["Traces"],"summary":"List traces","description":"List traces within the authenticated project.","operationId":"traces_list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceListRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/traces/{id}":{"get":{"tags":["Traces"],"summary":"Get a trace","description":"Fetch a single trace by external trace id (`trace.id`) within the authenticated project.","operationId":"traces_retrieve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/containers":{"post":{"tags":["Containers"],"summary":"Create a container","description":"Create a new container. Containers represent one task in your codebase. Each container utilizes separate models, routing, and evaluations, and collects data separately.","operationId":"containers_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContainerReq"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContainerRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Containers"],"summary":"List containers","description":"List containers owned by the authenticated project.","operationId":"containers_list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContainerListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/containers/{label}":{"get":{"tags":["Containers"],"summary":"Get a container","description":"Fetch a single container by label within the authenticated project.","operationId":"containers_retrieve","parameters":[{"name":"label","in":"path","required":true,"schema":{"type":"string","title":"Label"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContainerRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Containers"],"summary":"Update a container","description":"Update container defaults by label within the authenticated project.","operationId":"containers_update","parameters":[{"name":"label","in":"path","required":true,"schema":{"type":"string","title":"Label"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContainerReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContainerRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Containers"],"summary":"Delete a container","description":"Soft-delete a container by label within the authenticated project.","operationId":"containers_delete","parameters":[{"name":"label","in":"path","required":true,"schema":{"type":"string","title":"Label"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteContainerRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models":{"post":{"tags":["Containers"],"summary":"Add a model to a container","description":"Attach a model to a container as a submodel with optional defaults.","operationId":"containers_models_add","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddModelToContainerReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddModelToContainerRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Models"],"summary":"List available models","description":"List models available to the authenticated project. When filtered by container, returns attached container models and may also include the container's effective default model if that default is globally scoped.","operationId":"models_list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max number of models.","default":500,"title":"Limit"},"description":"Max number of models."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of models to skip.","default":0,"title":"Offset"},"description":"Number of models to skip."},{"name":"container","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Container ID or label to filter models by. Container-scoped results include attached models and may also include the effective default model when it is globally scoped.","title":"Container"},"description":"Container ID or label to filter models by. Container-scoped results include attached models and may also include the effective default model when it is globally scoped."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files":{"post":{"tags":["Files"],"summary":"Upload a file","description":"Upload a file to the platform. This endpoint accepts a file and a purpose, and uploads the file to the platform, for later use in training or evaluation.","operationId":"files_create","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_files_create"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileObject"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Files"],"summary":"List files (OpenAI-compatible)","description":"List files owned by the authenticated project, optionally filtered by purpose.","operationId":"files_list","parameters":[{"name":"purpose","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by purpose","title":"Purpose"},"description":"Filter by purpose"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Max number of files.","default":100,"title":"Limit"},"description":"Max number of files."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of files to skip.","default":0,"title":"Offset"},"description":"Number of files to skip."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/{file_id}":{"get":{"tags":["Files"],"summary":"Retrieve file metadata ","description":"Fetch metadata for a single file by id within the authenticated project.","operationId":"files_retrieve","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"File id (UUID)","title":"File Id"},"description":"File id (UUID)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileObject"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Files"],"summary":"Delete a file (OpenAI-compatible)","description":"Soft-delete a file by id within the authenticated project.","operationId":"files_delete","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"File id (UUID)","title":"File Id"},"description":"File id (UUID)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDeleteResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/files/{file_id}/content":{"get":{"tags":["Files"],"summary":"Retrieve file content (OpenAI-compatible)","description":"Download the raw contents of a file by id within the authenticated project.","operationId":"files_content","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","description":"File id (UUID)","title":"File Id"},"description":"File id (UUID)"}],"responses":{"200":{"description":"Raw file bytes","content":{"application/json":{"schema":{}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/jsonl":{"schema":{"type":"string","format":"binary"}},"text/plain":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rlm/responses":{"post":{"tags":["RLM"],"summary":"Create an RLM response","description":"OpenAI Responses-style endpoint for Recursive Language Model execution. Accepts a strict subset of the Responses request shape and proxies to the internal RLM backend.","operationId":"rlm_responses_create","requestBody":{"content":{"application/json":{"schema":{"$defs":{"RLMControls":{"properties":{"engine":{"title":"Engine","description":"Execution engine to use. `classic` runs the iterative Maniac RLM, while `lambda` runs the deterministic lambda-style executor.","type":"string","enum":["classic","lambda"],"x-extensible-enum":["classic","lambda"],"nullable":true},"max_depth":{"anyOf":[{"type":"integer","maximum":24.0,"minimum":1.0},{"type":"null"}],"title":"Max Depth","description":"Maximum recursion depth for the backend RLM worker. For `lambda`, this caps the planned decomposition depth."},"max_iterations":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Max Iterations","description":"Maximum REPL iterations per recursion level. Used by `classic`."},"max_budget":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.01},{"type":"null"}],"title":"Max Budget","description":"Hard budget cap in USD."},"max_timeout":{"anyOf":[{"type":"number","maximum":1800.0,"minimum":10.0},{"type":"null"}],"title":"Max Timeout","description":"Hard timeout in seconds."},"enabled_tools":{"anyOf":[{"items":{"type":"string","enum":["browser_read_page","web_search"]},"type":"array"},{"type":"null"}],"title":"Enabled Tools","description":"Optional server-defined RLM tools to expose during execution, such as 'web_search' or 'browser_read_page'. For `classic`, omitting this field enables the backend defaults. For `lambda`, tools are opt-in and must be listed explicitly."},"tool_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Config","description":"Optional per-tool configuration forwarded to the backend RLM API. When `engine` is `lambda`, this requires explicit `enabled_tools`."}},"additionalProperties":false,"type":"object","title":"RLMControls"},"RLMResponsesInputMessage":{"properties":{"type":{"type":"string","const":"message","title":"Type","default":"message"},"role":{"type":"string","enum":["user","assistant","system","developer"],"title":"Role","description":"Supported message role."},"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/$defs/RLMResponsesInputText"},"type":"array"}],"title":"Content","description":"Text-only Responses message content."}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"RLMResponsesInputMessage"},"RLMResponsesInputText":{"properties":{"type":{"type":"string","const":"input_text","title":"Type","default":"input_text"},"text":{"type":"string","title":"Text","description":"Text content for a Responses input part."}},"additionalProperties":false,"type":"object","required":["text"],"title":"RLMResponsesInputText"},"RLMResponsesReasoning":{"properties":{"effort":{"title":"Effort","description":"Reasoning effort forwarded to the backend RLM API.","type":"string","enum":["low","medium","high"],"x-extensible-enum":["low","medium","high"],"nullable":true}},"additionalProperties":false,"type":"object","title":"RLMResponsesReasoning"}},"properties":{"model":{"type":"string","title":"Model","description":"Model slug to run through the RLM backend."},"input":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/$defs/RLMResponsesInputMessage"},"type":"array"}],"title":"Input","description":"String input or a text-only array of Responses message items."},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions","description":"Optional top-level instructions mapped to the backend root prompt."},"background":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Background","description":"When true, start the RLM run in the background and return an in-progress response resource that can be retrieved later.","default":false},"reasoning":{"anyOf":[{"$ref":"#/$defs/RLMResponsesReasoning"},{"type":"null"}],"description":"Optional reasoning controls."},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata echoed in the gateway response."},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store","description":"Must be false or omitted. Stateful Responses storage is not supported."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Must be false or omitted. Streaming is not supported for this route."},"rlm":{"anyOf":[{"$ref":"#/$defs/RLMControls"},{"type":"null"}],"description":"RLM-specific execution controls."}},"additionalProperties":false,"type":"object","required":["model","input"],"title":"RLMResponsesCreateRequest","description":"Strict OpenAI Responses-style request supported by the RLM gateway endpoint.","examples":[{"background":false,"input":"Summarize this document.","instructions":"Be concise and factual.","metadata":{"source":"dashboard"},"model":"openai/gpt-4o","reasoning":{"effort":"medium"},"rlm":{"max_depth":2,"max_iterations":30},"store":false,"stream":false}]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RLMResponsesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/rlm/responses/{response_id}":{"get":{"tags":["RLM"],"summary":"Get an RLM response","description":"Retrieve a background RLM response resource by id within the authenticated project.","operationId":"rlm_responses_retrieve","parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string","title":"Response Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RLMResponsesResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evaluators":{"post":{"tags":["Evaluation"],"summary":"Create an evaluator","description":"Create a new evaluator scoped to a project or container.","operationId":"evaluators_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorReq"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JudgeEvaluator"},{"$ref":"#/components/schemas/CodeEvaluator"}],"title":"Response Evaluators Create"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Evaluation"],"summary":"List evaluators","description":"List evaluators for the authenticated project, optionally filtered by container.","operationId":"evaluators_list","parameters":[{"name":"container","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluatorListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evaluators/{evaluator}":{"get":{"tags":["Evaluation"],"summary":"Get an evaluator","description":"Fetch a single evaluator by id or name within the authenticated project.","operationId":"evaluators_retrieve","parameters":[{"name":"evaluator","in":"path","required":true,"schema":{"type":"string","title":"Evaluator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JudgeEvaluator"},{"$ref":"#/components/schemas/CodeEvaluator"}],"title":"Response Evaluators Retrieve"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Evaluation"],"summary":"Update an evaluator","description":"Update an existing evaluator by id or name.","operationId":"evaluators_update","parameters":[{"name":"evaluator","in":"path","required":true,"schema":{"type":"string","title":"Evaluator"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEvaluatorReq"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/JudgeEvaluator"},{"$ref":"#/components/schemas/CodeEvaluator"}],"title":"Response Evaluators Update"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evaluators/{evaluator_id}":{"delete":{"tags":["Evaluation"],"summary":"Delete an evaluator","description":"Delete an evaluator by id.","operationId":"evaluators_delete","parameters":[{"name":"evaluator_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluator Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEvaluatorRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evaluation/runs":{"post":{"tags":["Evaluation"],"summary":"Create an evaluation run","description":"Launch an evaluation run. Validates access to the specified container, evaluators, data sources, and models, then dispatches the run through the backend gateway interface.","operationId":"evaluation_runs_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunReq"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRun"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Evaluation"],"summary":"List evaluation runs","description":"List evaluation runs for the authenticated project. Optionally filter by container and status.","operationId":"evaluation_runs_list","parameters":[{"name":"container","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Container ID or label to filter by.","title":"Container"},"description":"Container ID or label to filter by."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by run status (e.g. 'running', 'completed', 'error').","title":"Status"},"description":"Filter by run status (e.g. 'running', 'completed', 'error')."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRunListResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evaluation/runs/{run_id}":{"get":{"tags":["Evaluation"],"summary":"Get an evaluation run","description":"Retrieve a single evaluation run by ID within the authenticated project.","operationId":"evaluation_runs_retrieve","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationRun"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets":{"post":{"tags":["Datasets"],"summary":"Create a dataset","description":"Create a dataset for a container using telemetry filters.","operationId":"datasets_create","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetReq"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatasetRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Datasets"],"summary":"List datasets","description":"List datasets owned by the authenticated project. Optionally filter by container.","operationId":"datasets_list","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max number of datasets.","default":100,"title":"Limit"},"description":"Max number of datasets."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of datasets to skip.","default":0,"title":"Offset"},"description":"Number of datasets to skip."},{"name":"container","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Container ID or label to filter datasets by.","title":"Container"},"description":"Container ID or label to filter datasets by."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Dataset_"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/datasets/{dataset_id}":{"get":{"tags":["Datasets"],"summary":"Get a dataset","description":"Fetch a dataset by id within the authenticated project.","operationId":"datasets_retrieve","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/optimization/runs":{"post":{"tags":["Optimization"],"summary":"Create an optimization run","description":"Create a new optimization run for a container using specified base models\nand evaluation criteria.","operationId":"create_optimization_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOptimizationRunReq"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOptimizationRunRes"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","headers":{"X-RateLimit-Limit":{"description":"Request limit per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp when the rate limit resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Not Implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"tags":["Health"],"summary":"Healthz","description":"Health check endpoint for load balancers and uptime monitors.","operationId":"healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[]}}},"components":{"schemas":{"AddModelToContainerReq":{"properties":{"model":{"type":"string","title":"Model","description":"Model slug or id to add."},"container":{"type":"string","title":"Container","description":"Container id or label."},"slug":{"type":"string","title":"Slug","description":"User specified submodel slug."},"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Input"},{"type":"null"}],"description":"Default inference parameters."},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Default system prompt."}},"type":"object","required":["model","container","slug"],"title":"AddModelToContainerReq"},"AddModelToContainerRes":{"properties":{"object":{"type":"string","const":"model","title":"Object","description":"Object type.","default":"model"},"id":{"type":"string","title":"Id","description":"Model id."},"container_id":{"type":"string","title":"Container Id","description":"Container id."},"slug":{"type":"string","title":"Slug","description":"Submodel slug."},"container":{"type":"string","title":"Container","description":"Container label."},"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Output"},{"type":"null"}],"description":"Default inference parameters."},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Default system prompt."}},"type":"object","required":["id","container_id","slug","container"],"title":"AddModelToContainerRes"},"AudioOutputConfig":{"properties":{"voice":{"type":"string","enum":["alloy","ash","ballad","coral","echo","fable","nova","onyx","sage","shimmer","verse"],"title":"Voice","description":"Voice identifier for synthesized audio."},"format":{"type":"string","enum":["wav","mp3","flac","opus","pcm16","aac"],"title":"Format","description":"Audio container format for the response."}},"additionalProperties":true,"type":"object","required":["voice","format"],"title":"AudioOutputConfig","description":"Audio output configuration (paired with ``modalities: [\"audio\"]``)."},"AudioResponse":{"properties":{"id":{"type":"string","title":"Id","description":"Audio response id."},"data":{"type":"string","title":"Data","description":"Base64-encoded audio bytes."},"expires_at":{"type":"integer","title":"Expires At","description":"Unix timestamp when the audio asset stops being retrievable."},"transcript":{"type":"string","title":"Transcript","description":"Transcript of the synthesized audio."}},"additionalProperties":true,"type":"object","required":["id","data","expires_at","transcript"],"title":"AudioResponse","description":"Audio output emitted on the assistant message (gpt-4o-audio family)."},"Body_files_create":{"properties":{"purpose":{"type":"string","title":"Purpose"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["purpose","file"],"title":"Body_files_create"},"ChatListRes":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ChatResRelaxed-Output"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"ChatListRes","description":"OpenAI-style list response for chat completions."},"ChatReq":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","title":"Messages","description":"Conversation messages."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model slug to use. Supports global slugs and container routes; `/` and `:` are treated equivalently on input.","examples":["openai/gpt-4o","openai:gpt-4o","maniac:my-container","maniac/my-container","maniac:my-container:openai:gpt-4o"]},"models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Models","description":"Fallback models."},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","description":"Frequency penalty."},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias","description":"Logit bias."},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","description":"Include logprobs."},"top_logprobs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Logprobs","description":"Top logprobs."},"max_completion_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Completion Tokens","description":"Max completion tokens."},"max_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Tokens","description":"Max tokens."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Arbitrary key/value metadata to attach to the request.","examples":[{"source":"dashboard"}]},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"Number of chat completion choices to generate (OpenAI ``n``)."},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","description":"Presence penalty."},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/ReasoningConfig"},{"type":"null"}],"description":"Reasoning config."},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"},{"type":"null"}],"title":"Response Format","description":"Response format."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed."},"service_tier":{"title":"Service Tier","description":"Service tier hint (auto/default/flex/scale/priority).","type":"string","enum":["auto","default","flex","scale","priority"],"x-extensible-enum":["auto","default","flex","scale","priority"],"nullable":true},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Stop sequences."},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","description":"Stream response.","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}],"description":"Streaming options (e.g. `include_usage`). Non-inference field: it is not validated against `model.supported_parameters`. Set `include_usage=true` to receive the final usage chunk in the stream."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Temperature."},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"type":"null"}],"title":"Tool Choice","description":"Tool choice."},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools."},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parallel Tool Calls","description":"Whether the model may emit multiple tool calls in parallel."},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"Top p."},"top_k":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top K","description":"Top-k sampling (OpenRouter / Anthropic / vLLM)."},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","description":"Min-p sampling cutoff (OpenRouter / vLLM)."},"top_a":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top A","description":"Top-a sampling cutoff (OpenRouter alternate sampler)."},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","description":"Repetition penalty (OpenRouter / non-OpenAI providers)."},"image_config":{"anyOf":[{"$ref":"#/components/schemas/ImageConfig"},{"type":"null"}],"description":"Image output configuration when ``modalities`` includes 'image'."},"modalities":{"anyOf":[{"items":{"type":"string","enum":["text","image","audio"]},"type":"array"},{"type":"null"}],"title":"Modalities","description":"Output modalities to enable (text, image, audio)."},"audio":{"anyOf":[{"$ref":"#/components/schemas/AudioOutputConfig"},{"type":"null"}],"description":"Audio output configuration when ``modalities`` includes 'audio'."},"prediction":{"anyOf":[{"$ref":"#/components/schemas/PredictionContent"},{"type":"null"}],"description":"Predicted output content for faster generation."},"web_search_options":{"anyOf":[{"$ref":"#/components/schemas/WebSearchOptions"},{"type":"null"}],"description":"Web search tool configuration for supported models."},"transforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transforms","description":"OpenRouter transform pipeline names (e.g. 'middle-out')."},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset","description":"OpenRouter preset name (server-side stored param bundle)."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Optional tags for tracking.","examples":[[]]},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store","description":"Whether to store the completion in the database.","default":true},"trace":{"anyOf":[{"$ref":"#/components/schemas/TraceContext"},{"type":"null"}],"description":"Optional external trace/span context used to group related requests across containers."}},"additionalProperties":false,"type":"object","required":["messages"],"title":"ManiacChatRequest","description":"OpenAI-compatible chat completion request with Maniac extensions.","examples":[{"messages":[{"content":"Hello!","role":"user"}],"model":"openai/gpt-4o","stream":false}]},"ChatRes":{"properties":{"id":{"type":"string","title":"Id","description":"Completion id."},"choices":{"items":{"$ref":"#/components/schemas/ChatResponseChoice-Output"},"type":"array","title":"Choices","description":"Response choices."},"created":{"type":"number","title":"Created","description":"Creation timestamp (unix)."},"model":{"type":"string","title":"Model","description":"Model used."},"object":{"type":"string","const":"chat.completion","title":"Object","description":"Object type.","default":"chat.completion"},"usage":{"anyOf":[{"$ref":"#/components/schemas/ChatResponseUsage"},{"type":"null"}],"description":"Token usage."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Upstream provider name, if available."},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label used for routing, if any."}},"additionalProperties":false,"type":"object","required":["id","choices","created","model"],"title":"ChatRes","examples":[{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hello!","role":"assistant"}}],"created":1710000000,"id":"chatcmpl-123","model":"openai/gpt-4o","object":"chat.completion"}]},"ChatResRelaxed-Input":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Completion id."},"choices":{"items":{"$ref":"#/components/schemas/RegisterOutputChoice"},"type":"array","title":"Choices"},"created":{"anyOf":[{},{"type":"null"}],"title":"Created","description":"Creation timestamp (unix seconds)."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model slug used."},"object":{"type":"string","const":"chat.completion","title":"Object","description":"Object type.","default":"chat.completion"},"usage":{"anyOf":[{"$ref":"#/components/schemas/ChatResponseUsage"},{"type":"null"}],"description":"Token usage."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Upstream provider name, if available."},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label used for routing, if any."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID (uuid)."},"spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend","description":"Estimated spend."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for this completion."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata for this completion."},"trace":{"anyOf":[{"$ref":"#/components/schemas/TraceContext"},{"type":"null"}],"description":"Optional external trace/span context associated with this completion."}},"type":"object","required":["choices"],"title":"ChatResRelaxed","examples":[{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hello!","role":"assistant"}}],"created":1710000000,"id":"chatcmpl-123","model":"openai/gpt-4o","object":"chat.completion"}]},"ChatResRelaxed-Output":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Completion id."},"choices":{"items":{"$ref":"#/components/schemas/RegisterOutputChoice"},"type":"array","title":"Choices"},"created":{"anyOf":[{},{"type":"null"}],"title":"Created","description":"Creation timestamp (unix seconds)."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Model slug used."},"object":{"type":"string","const":"chat.completion","title":"Object","description":"Object type.","default":"chat.completion"},"usage":{"anyOf":[{"$ref":"#/components/schemas/ChatResponseUsage"},{"type":"null"}],"description":"Token usage."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Upstream provider name, if available."},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label used for routing, if any."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id","description":"Model ID (uuid)."},"spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend","description":"Estimated spend."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for this completion."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Metadata for this completion."},"trace":{"anyOf":[{"$ref":"#/components/schemas/TraceContext"},{"type":"null"}],"description":"Optional external trace/span context associated with this completion."}},"type":"object","required":["choices"],"title":"ChatResRelaxed","examples":[{"choices":[{"finish_reason":"stop","index":0,"message":{"content":"Hello!","role":"assistant"}}],"created":1710000000,"id":"chatcmpl-123","model":"openai/gpt-4o","object":"chat.completion"}]},"ChatResponseChoice-Input":{"properties":{"index":{"type":"number","title":"Index","description":"Choice index."},"message":{"$ref":"#/components/schemas/ChatResponseMessage-Input","description":"Assistant message."},"finish_reason":{"title":"Finish Reason","description":"Reason generation finished.","type":"string","enum":["stop","length","tool_calls","content_filter","error"],"x-extensible-enum":["stop","length","tool_calls","content_filter","error"],"nullable":true},"logprobs":{"anyOf":[{},{"type":"null"}],"title":"Logprobs","description":"Logprobs if requested."}},"additionalProperties":false,"type":"object","required":["index","message"],"title":"ChatResponseChoice","description":"Single choice in a chat completion response."},"ChatResponseChoice-Output":{"properties":{"index":{"type":"number","title":"Index","description":"Choice index."},"message":{"$ref":"#/components/schemas/ChatResponseMessage-Output","description":"Assistant message."},"finish_reason":{"title":"Finish Reason","description":"Reason generation finished.","type":"string","enum":["stop","length","tool_calls","content_filter","error"],"x-extensible-enum":["stop","length","tool_calls","content_filter","error"],"nullable":true},"logprobs":{"anyOf":[{},{"type":"null"}],"title":"Logprobs","description":"Logprobs if requested."}},"additionalProperties":false,"type":"object","required":["index","message"],"title":"ChatResponseChoice","description":"Single choice in a chat completion response."},"ChatResponseMessage-Input":{"properties":{"role":{"type":"string","title":"Role","description":"Message role."},"content":{"anyOf":[{},{"type":"null"}],"title":"Content","description":"Message content."},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal","description":"Refusal text when the model declines to answer."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional name."},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls."},"audio":{"anyOf":[{"$ref":"#/components/schemas/AudioResponse"},{"type":"null"}],"description":"Audio output when the assistant returns audio (modalities=['audio'])."},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageContentPart"},"type":"array"},{"type":"null"}],"title":"Images","description":"Generated images (OpenRouter image-output models; modalities=['image'])."}},"additionalProperties":true,"type":"object","required":["role"],"title":"ChatResponseMessage","description":"Assistant message in a choice."},"ChatResponseMessage-Output":{"properties":{"role":{"type":"string","title":"Role","description":"Message role."},"content":{"anyOf":[{},{"type":"null"}],"title":"Content","description":"Message content."},"refusal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refusal","description":"Refusal text when the model declines to answer."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional name."},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls."},"audio":{"anyOf":[{"$ref":"#/components/schemas/AudioResponse"},{"type":"null"}],"description":"Audio output when the assistant returns audio (modalities=['audio'])."},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageContentPart"},"type":"array"},{"type":"null"}],"title":"Images","description":"Generated images (OpenRouter image-output models; modalities=['image'])."}},"additionalProperties":true,"type":"object","required":["role"],"title":"ChatResponseMessage","description":"Assistant message in a choice."},"ChatResponseUsage":{"properties":{"prompt_tokens":{"type":"number","title":"Prompt Tokens","description":"Prompt tokens."},"completion_tokens":{"type":"number","title":"Completion Tokens","description":"Completion tokens."},"total_tokens":{"type":"number","title":"Total Tokens","description":"Total tokens."},"completion_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Completion Tokens Details"},"prompt_tokens_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prompt Tokens Details"}},"additionalProperties":true,"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"ChatResponseUsage","description":"Token usage in a chat completion response."},"CodeEvaluator":{"properties":{"object":{"type":"string","const":"evaluator.code","title":"Object","description":"Object type.","default":"evaluator.code"},"project_id":{"type":"string","title":"Project Id","description":"Project id."},"container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Id","description":"Container id."},"id":{"type":"string","title":"Id","description":"Evaluator id."},"name":{"type":"string","title":"Name","description":"Evaluator name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Evaluator description."},"created_at":{"type":"string","title":"Created At","description":"Creation timestamp."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"pass_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pass Threshold","description":"Optional pass threshold."},"mode":{"type":"string","enum":["pointwise","reference","pairwise"],"title":"Mode","description":"Evaluation mode: score a candidate directly, against a reference, or against a baseline.","default":"pointwise"},"api":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api","description":"API type."},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label (if container-specific)."},"source":{"type":"string","title":"Source","description":"Source code to evaluate."},"requirements":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requirements","description":"Optional list of package requirements."}},"type":"object","required":["project_id","id","name","created_at","source"],"title":"CodeEvaluator"},"Container-Input":{"properties":{"id":{"type":"string","title":"Id","description":"Container id."},"object":{"type":"string","const":"container","title":"Object","description":"Object type.","default":"container"},"project_id":{"type":"string","title":"Project Id","description":"Project id."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Organization id."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Owner user id."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Creation timestamp."},"label":{"type":"string","title":"Label","description":"Container label."},"api":{"type":"string","enum":["chat.completions","completions","responses","embeddings","rerank","containers","models","datasets","evaluation","optimization","project.keys"],"title":"Api","description":"API type.","default":"chat.completions"},"best_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Best Model Id","description":"Best model id."},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Default system prompt."},"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Input"},{"type":"null"}],"description":"Default inference parameters."},"optimized_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimized System Prompt","description":"Optimized system prompt."},"system_prompt_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Prefix","description":"GEPA-optimized prefix prepended to every request's system prompt."},"optimized_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Input"},{"type":"null"}],"description":"Optimized inference parameters."},"default_few_shot_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Default Few Shot Messages","description":"Default few shot messages."},"optimized_few_shot_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Optimized Few Shot Messages","description":"Optimized few shot messages."},"initial_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Model","description":"Initial model slug."},"deleted_at":{"type":"boolean","title":"Deleted At","description":"Soft delete flag.","default":false}},"type":"object","required":["id","project_id","label"],"title":"Container"},"Container-Output":{"properties":{"id":{"type":"string","title":"Id","description":"Container id."},"object":{"type":"string","const":"container","title":"Object","description":"Object type.","default":"container"},"project_id":{"type":"string","title":"Project Id","description":"Project id."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Organization id."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Owner user id."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Creation timestamp."},"label":{"type":"string","title":"Label","description":"Container label."},"api":{"type":"string","enum":["chat.completions","completions","responses","embeddings","rerank","containers","models","datasets","evaluation","optimization","project.keys"],"title":"Api","description":"API type.","default":"chat.completions"},"best_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Best Model Id","description":"Best model id."},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Default system prompt."},"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Output"},{"type":"null"}],"description":"Default inference parameters."},"optimized_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimized System Prompt","description":"Optimized system prompt."},"system_prompt_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Prefix","description":"GEPA-optimized prefix prepended to every request's system prompt."},"optimized_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Output"},{"type":"null"}],"description":"Optimized inference parameters."},"default_few_shot_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Default Few Shot Messages","description":"Default few shot messages."},"optimized_few_shot_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Optimized Few Shot Messages","description":"Optimized few shot messages."},"initial_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Model","description":"Initial model slug."},"deleted_at":{"type":"boolean","title":"Deleted At","description":"Soft delete flag.","default":false}},"type":"object","required":["id","project_id","label"],"title":"Container"},"ContainerDataSource":{"properties":{"range":{"anyOf":[{"type":"string","pattern":"^\\d+:\\d+$","description":"Range to evaluate, as 'start:end' (e.g. '0:200')","examples":["0:200"]},{"type":"null"}],"title":"Range","default":"0:100"},"type":{"type":"string","const":"container","title":"Type"},"container":{"type":"string","minLength":1,"title":"Container","description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]}},"additionalProperties":false,"type":"object","required":["type","container"],"title":"ContainerDataSource"},"ContainerListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/Container-Output"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"ContainerListResponse"},"CreateContainerReq":{"properties":{"label":{"type":"string","title":"Label","description":"Container label."},"initial_model":{"type":"string","title":"Initial Model","description":"Initial model slug."},"api":{"type":"string","enum":["chat.completions","completions","responses","embeddings","rerank","containers","models","datasets","evaluation","optimization","project.keys"],"title":"Api","description":"API type.","default":"chat.completions"},"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Input"},{"type":"null"}],"description":"Default inference parameters."},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Default system prompt."}},"type":"object","required":["label","initial_model"],"title":"CreateContainerReq"},"CreateContainerRes":{"properties":{"id":{"type":"string","title":"Id","description":"Container id."},"object":{"type":"string","const":"container","title":"Object","description":"Object type.","default":"container"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Organization id."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Creation timestamp."},"label":{"type":"string","title":"Label","description":"Container label."},"api":{"type":"string","enum":["chat.completions","completions","responses","embeddings","rerank","containers","models","datasets","evaluation","optimization","project.keys"],"title":"Api","description":"API type.","default":"chat.completions"},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Default system prompt."},"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Output"},{"type":"null"}],"description":"Default inference parameters."},"optimized_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Optimized System Prompt","description":"Optimized system prompt."},"system_prompt_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt Prefix","description":"GEPA-optimized prefix prepended to every request's system prompt."},"optimized_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Output"},{"type":"null"}],"description":"Optimized inference parameters."},"default_few_shot_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Default Few Shot Messages","description":"Default few shot messages."},"optimized_few_shot_messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Optimized Few Shot Messages","description":"Optimized few shot messages."},"initial_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Model","description":"Initial model slug."},"deleted_at":{"type":"boolean","title":"Deleted At","description":"Soft delete flag.","default":false}},"type":"object","required":["id","label"],"title":"CreateContainerRes"},"CreateDatasetReq":{"properties":{"name":{"type":"string","title":"Name","description":"Dataset name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Dataset description."},"container":{"type":"string","title":"Container","description":"Container id or label for source data."},"size":{"type":"integer","exclusiveMinimum":0.0,"title":"Size","description":"Requested dataset size."},"filters":{"items":{"$ref":"#/components/schemas/DatasetFilter"},"type":"array","title":"Filters","description":"Filter conditions."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional dataset tags."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Arbitrary metadata."}},"additionalProperties":false,"type":"object","required":["name","container","size"],"title":"CreateDatasetReq","examples":[{"container":"maniac:support","description":"Support chat quality dataset","filters":[{"key":"model_name","operator":"equals","value":"gpt-4o"}],"metadata":{"source":"dashboard"},"name":"support-evals","size":500,"tags":["support","evals"]}]},"CreateDatasetRes":{"properties":{"id":{"type":"string","title":"Id","description":"ID of the created dataset."},"message":{"type":"string","title":"Message","description":"Status message."}},"type":"object","required":["id","message"],"title":"CreateDatasetRes"},"CreateOptimizationRunReq":{"properties":{"container":{"type":"string","minLength":1,"title":"Container","description":"Container id or label.","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]},"base_models":{"items":{"type":"string","minLength":1,"description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]},"type":"array","title":"Base Models","description":"Base model ids or labels."},"evals":{"items":{"type":"string","minLength":1,"description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]},"type":"array","title":"Evals","description":"Evaluator ids or labels."},"methods":{"items":{"anyOf":[{"$ref":"#/components/schemas/SFTMethod"},{"$ref":"#/components/schemas/GRPOMethod"}]},"type":"array","title":"Methods","description":"Optimization methods to run."},"data_source":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/FileDataSource"},{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","file":"#/components/schemas/FileDataSource"}}},{"type":"null"}],"title":"Data Source","description":"Optional data source override."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment","description":"Execution environment name.","default":"main"}},"type":"object","required":["container","base_models","evals","methods"],"title":"CreateOptimizationRunReq"},"CreateOptimizationRunRes":{"properties":{"created_at":{"type":"string","title":"Created At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"error_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error At"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{},{"type":"null"}],"title":"Error"},"object":{"type":"string","const":"optimization.run","title":"Object","description":"Object type.","default":"optimization.run"},"id":{"type":"string","title":"Id","description":"Optimization run id."},"container_id":{"type":"string","title":"Container Id","description":"Container id."},"base_models":{"items":{"type":"string"},"type":"array","title":"Base Models","description":"Base model ids."},"methods":{"items":{"anyOf":[{"$ref":"#/components/schemas/SFTMethod"},{"$ref":"#/components/schemas/GRPOMethod"}]},"type":"array","title":"Methods","description":"Optimization methods used."},"dataset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset","description":"Dataset id."},"evaluators":{"items":{"type":"string"},"type":"array","title":"Evaluators","description":"Evaluator ids."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Optimization metrics."},"spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend","description":"Estimated spend."},"best_checkpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Best Checkpoint","description":"Best checkpoint id."}},"type":"object","required":["created_at","status","id","container_id","base_models","methods","evaluators"],"title":"CreateOptimizationRunRes"},"Dataset":{"properties":{"id":{"type":"string","title":"Id","description":"Dataset id."},"object":{"type":"string","const":"dataset","title":"Object","description":"Object type.","default":"dataset"},"name":{"type":"string","title":"Name","description":"Dataset name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Dataset description."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"Owner user id."},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id","description":"Project id."},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id","description":"Organization id."},"container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Id","description":"Container id."},"requested_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requested Size","description":"Requested dataset size."},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size","description":"Actual dataset size."},"filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/DatasetFilter"},"type":"array"},{"type":"null"}],"title":"Filters","description":"Filters applied when building the dataset."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"Creation timestamp."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional dataset tags."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Arbitrary metadata."}},"type":"object","required":["id","name"],"title":"Dataset"},"DatasetDataSource":{"properties":{"range":{"anyOf":[{"type":"string","pattern":"^\\d+:\\d+$","description":"Range to evaluate, as 'start:end' (e.g. '0:200')","examples":["0:200"]},{"type":"null"}],"title":"Range","default":"0:100"},"type":{"type":"string","const":"dataset","title":"Type"},"dataset":{"type":"string","minLength":1,"title":"Dataset","description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]}},"additionalProperties":false,"type":"object","required":["type","dataset"],"title":"DatasetDataSource"},"DatasetFilter":{"properties":{"key":{"type":"string","title":"Key","description":"Filter key (e.g. 'model_name', 'status')."},"operator":{"$ref":"#/components/schemas/DatasetFilterOperator","description":"Filter operator."},"value":{"anyOf":[{},{"type":"null"}],"title":"Value","description":"Filter value (required for most operators)."}},"additionalProperties":false,"type":"object","required":["key","operator"],"title":"DatasetFilter"},"DatasetFilterOperator":{"type":"string","enum":["equals","not_equals","contains","not_contains","greater_than","less_than","greater_than_or_equal","less_than_or_equal","in","not_in","exists","not_exists","between"],"title":"DatasetFilterOperator"},"DeleteContainerRes":{"properties":{"object":{"type":"string","const":"container","title":"Object","description":"Object type.","default":"container"},"label":{"type":"string","title":"Label","description":"Container label."},"deleted":{"type":"boolean","const":true,"title":"Deleted","description":"Deletion status.","default":true}},"additionalProperties":false,"type":"object","required":["label"],"title":"DeleteContainerRes"},"DeleteEvaluatorRes":{"properties":{"object":{"type":"string","const":"evaluator","title":"Object","description":"Object type.","default":"evaluator"},"id":{"type":"string","title":"Id","description":"Evaluator id."},"deleted":{"type":"boolean","const":true,"title":"Deleted","description":"Deletion status.","default":true}},"additionalProperties":false,"type":"object","required":["id"],"title":"DeleteEvaluatorRes"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ManiacError","description":"Error payload."}},"additionalProperties":false,"type":"object","required":["error"],"title":"ErrorResponse","description":"Response body for errors.","examples":[{"error":{"code":"UNAUTHORIZED","message":"Missing API key."}},{"error":{"code":"NOT_FOUND","message":"Resource not found."}}]},"EvaluationRun":{"properties":{"created_at":{"type":"string","title":"Created At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"error_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error At"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{},{"type":"null"}],"title":"Error"},"object":{"type":"string","const":"evaluation.run","title":"Object","description":"Object type.","default":"evaluation.run"},"id":{"type":"string","title":"Id","description":"Evaluation run id (run group id)."},"process_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Id","description":"Process id for lifecycle tracking."},"evaluators":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Evaluators","description":"Evaluator ids used in this run."},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container id."},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id","description":"Dataset id (if a dataset was used)."},"sample":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"},{"$ref":"#/components/schemas/GenerateDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","generate":"#/components/schemas/GenerateDataSource"}}},{"type":"null"}],"title":"Sample","description":"Resolved sample-side data source."},"ground_truth":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"},{"$ref":"#/components/schemas/GenerateDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","generate":"#/components/schemas/GenerateDataSource"}}},{"type":"null"}],"title":"Ground Truth","description":"Resolved ground-truth-side data source."},"baseline":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"},{"$ref":"#/components/schemas/GenerateDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","generate":"#/components/schemas/GenerateDataSource"}}},{"type":"null"}],"title":"Baseline","description":"Resolved baseline-side data source for pairwise evaluation."},"results":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunResults-Output"},{"type":"null"}],"description":"Evaluation results (populated on completion)."},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Evaluation metrics (populated on completion)."},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config","description":"Run configuration as submitted."},"spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Spend","description":"Estimated spend."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."}},"type":"object","required":["created_at","status","id"],"title":"EvaluationRun","description":"Response model for an evaluation run."},"EvaluationRunListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/EvaluationRun"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"EvaluationRunListResponse"},"EvaluationRunOverallResults":{"properties":{"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average score across all evaluators."},"avg_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Accuracy","description":"Average accuracy across all evaluators."}},"additionalProperties":true,"type":"object","title":"EvaluationRunOverallResults","description":"Aggregated scores across all models and evaluators."},"EvaluationRunPerEvalResults":{"properties":{"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy","description":"Accuracy ratio."},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average score."},"num_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Total","description":"Total number of evaluation samples."},"num_errors":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Errors","description":"Number of samples that errored."},"num_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Failed","description":"Number of samples that failed."},"num_passed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Passed","description":"Number of samples that passed."},"num_scored":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Scored","description":"Number of samples that were scored."},"num_missing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Missing","description":"Number of samples with missing data."},"avg_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Accuracy","description":"Average accuracy for this evaluator."},"break_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Break Reason","description":"Why evaluation stopped (e.g. 'expected_count_reached')."},"expected_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Count","description":"Expected sample count for this evaluator."}},"additionalProperties":true,"type":"object","title":"EvaluationRunPerEvalResults","description":"Per-evaluator breakdown within a single model run."},"EvaluationRunPerModelResults":{"properties":{"model":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Model","description":"Model configuration used (sample and ground-truth generation models)."},"per_eval":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EvaluationRunPerEvalResults"},"type":"object"},{"type":"null"}],"title":"Per Eval","description":"Results keyed by evaluator UUID."},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average score for this model."},"avg_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Accuracy","description":"Average accuracy for this model."},"launch_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launch Index","description":"Index of this model launch."},"launch_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Launch Call Id","description":"Modal function call id for this launch."}},"additionalProperties":true,"type":"object","title":"EvaluationRunPerModelResults","description":"Results for a single model within an evaluation run."},"EvaluationRunReq":{"properties":{"container":{"type":"string","title":"Container","description":"Container id or label."},"evaluators":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Evaluators","description":"Evaluator ids or labels."},"sample":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"},{"$ref":"#/components/schemas/GenerateDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","generate":"#/components/schemas/GenerateDataSource"}}},{"type":"null"}],"title":"Sample","description":"Sample-side data source. Omit to default to the container's task logs. Use type='dataset' to pull from a dataset, type='container' to pull from task logs, or type='generate' to generate completions with the specified models."},"ground_truth":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"},{"$ref":"#/components/schemas/GenerateDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","generate":"#/components/schemas/GenerateDataSource"}}},{"type":"null"}],"title":"Ground Truth","description":"Ground-truth-side data source. Omit to default to the container's task logs. Use type='dataset' to pull from a dataset, type='container' to pull from task logs, or type='generate' to generate completions with a model."},"baseline":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/DatasetDataSource"},{"$ref":"#/components/schemas/ContainerDataSource"},{"$ref":"#/components/schemas/GenerateDataSource"}],"discriminator":{"propertyName":"type","mapping":{"container":"#/components/schemas/ContainerDataSource","dataset":"#/components/schemas/DatasetDataSource","generate":"#/components/schemas/GenerateDataSource"}}},{"type":"null"}],"title":"Baseline","description":"Baseline-side data source for pairwise evaluation. Use type='dataset' to pull from a dataset, type='container' to pull from task logs, or type='generate' to generate completions with a model."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"environment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Environment","description":"Execution environment name (maps to Modal app suffix).","default":"main"}},"additionalProperties":false,"type":"object","required":["container","evaluators"],"title":"EvaluationRunReq","description":"Request body for creating an evaluation run.\n\nEach side of the evaluation (``sample`` and ``ground_truth``) is described\nby a single data-source object whose ``type`` discriminator determines how\ndata is obtained:\n\n- ``\"dataset\"``   — pull from a dataset.\n- ``\"container\"`` — pull from the container's task logs.\n- ``\"generate\"``  — generate completions using one or more models.\n\nBoth fields are optional, but **at least one must be provided**.  When a\nside is omitted it defaults to the top-level container's task logs.  At\nleast one resolved side must not be ``type='generate'`` so there is seed\ninput to evaluate against."},"EvaluationRunResults-Input":{"properties":{"overall":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunOverallResults"},{"type":"null"}],"description":"Aggregate scores across all models and evaluators."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional result metadata."},"per_model":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunPerModelResults"},"type":"array"},{"type":"null"}],"title":"Per Model","description":"Per-model result breakdowns."},"launch_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launch Count","description":"Number of model launches in this run."}},"additionalProperties":true,"type":"object","title":"EvaluationRunResults","description":"Typed representation of the evaluation run results payload."},"EvaluationRunResults-Output":{"properties":{"overall":{"anyOf":[{"$ref":"#/components/schemas/EvaluationRunOverallResults"},{"type":"null"}],"description":"Aggregate scores across all models and evaluators."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional result metadata."},"per_model":{"anyOf":[{"items":{"$ref":"#/components/schemas/EvaluationRunPerModelResults"},"type":"array"},{"type":"null"}],"title":"Per Model","description":"Per-model result breakdowns."},"launch_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Launch Count","description":"Number of model launches in this run."}},"additionalProperties":true,"type":"object","title":"EvaluationRunResults","description":"Typed representation of the evaluation run results payload."},"EvaluatorListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/JudgeEvaluator"},{"$ref":"#/components/schemas/CodeEvaluator"}]},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"EvaluatorListResponse"},"EvaluatorReq":{"properties":{"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label."},"type":{"type":"string","enum":["judge","code"],"title":"Type","description":"Evaluator type."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Judge model slug."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Judge prompt."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Code evaluator source."},"requirements":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requirements","description":"Optional requirements list."},"pass_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pass Threshold","description":"Optional pass threshold."},"mode":{"type":"string","enum":["pointwise","reference","pairwise"],"title":"Mode","description":"Evaluation mode.","default":"pointwise"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Evaluator name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Evaluator description."},"api":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api","description":"API type."},"inference_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inference Parameters","description":"Optional inference parameters for judge evaluators (e.g. response_format, temperature)."}},"additionalProperties":false,"type":"object","required":["type"],"title":"EvaluatorReq"},"FileContentPart":{"properties":{"type":{"type":"string","const":"file","title":"Type","description":"Content part type.","default":"file"},"file":{"$ref":"#/components/schemas/FileRef","description":"File reference (uploaded id or inline data)."}},"type":"object","required":["file"],"title":"FileContentPart","description":"File content part (e.g. PDFs) attached to a user message."},"FileDataSource":{"properties":{"range":{"anyOf":[{"type":"string","pattern":"^\\d+:\\d+$","description":"Range to evaluate, as 'start:end' (e.g. '0:200')","examples":["0:200"]},{"type":"null"}],"title":"Range","default":"0:100"},"type":{"type":"string","const":"file","title":"Type"},"file":{"type":"string","minLength":1,"title":"File","description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]}},"additionalProperties":false,"type":"object","required":["type","file"],"title":"FileDataSource"},"FileDeleteResponse":{"properties":{"id":{"type":"string","title":"Id","description":"File id (UUID)."},"object":{"type":"string","const":"file","title":"Object","description":"Object type.","default":"file"},"deleted":{"type":"boolean","title":"Deleted","description":"Deletion status.","default":true}},"additionalProperties":false,"type":"object","required":["id"],"title":"FileDeleteResponse","description":"OpenAI-compatible delete response."},"FileListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/FileObject"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"FileListResponse","description":"OpenAI-compatible list response for files."},"FileObject":{"properties":{"id":{"type":"string","title":"Id","description":"File id (UUID)."},"object":{"type":"string","const":"file","title":"Object","description":"Object type.","default":"file"},"bytes":{"type":"integer","minimum":0.0,"title":"Bytes","description":"File size in bytes."},"created_at":{"type":"integer","minimum":0.0,"title":"Created At","description":"Unix timestamp (seconds)."},"filename":{"type":"string","title":"Filename","description":"Original filename."},"purpose":{"type":"string","title":"Purpose","description":"Intended file purpose."},"status":{"type":"string","title":"Status","description":"Current file status."},"status_details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Details","description":"Optional status details."}},"additionalProperties":false,"type":"object","required":["id","bytes","created_at","filename","purpose","status"],"title":"FileObject","description":"OpenAI-compatible file object (subset).\n\nWe keep `id` as the DB UUID string, and expose the OpenAI-ish envelope.","examples":[{"bytes":1200,"created_at":1710000000,"filename":"training.jsonl","id":"file-123","object":"file","purpose":"fine-tune","status":"uploaded"}]},"FileRef":{"properties":{"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"Id of a previously uploaded file."},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename","description":"Display filename to send to the model (required with file_data)."},"file_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Data","description":"Inline file payload as a data URL (e.g. data:application/pdf;base64,...)."}},"additionalProperties":true,"type":"object","title":"FileRef","description":"File reference inside a file content part.\n\nEither ``file_id`` (a previously uploaded file) or ``file_data`` (an inline\ndata URL, typically alongside ``filename``) must be set, matching OpenAI's\nfile input shape for chat completions."},"FunctionCall":{"properties":{"name":{"type":"string","title":"Name","description":"Function name."},"arguments":{"type":"string","title":"Arguments","description":"JSON-encoded arguments."}},"type":"object","required":["name","arguments"],"title":"FunctionCall","description":"Function call payload inside a tool call."},"FunctionDefinition":{"properties":{"name":{"type":"string","title":"Name","description":"Function name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of what the function does."},"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters","description":"JSON Schema for the function parameters."},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict","description":"Whether to enforce strict schema adherence."}},"type":"object","required":["name"],"title":"FunctionDefinition","description":"Function definition inside a tool."},"GRPOHyperparameters":{"properties":{"lora_alpha":{"items":{"type":"number"},"type":"array","title":"Lora Alpha"},"lora_targets":{"items":{"type":"string"},"type":"array","title":"Lora Targets"},"learning_rate":{"type":"number","title":"Learning Rate"},"batch_size":{"type":"integer","title":"Batch Size"},"max_steps":{"type":"integer","title":"Max Steps"},"seed":{"type":"integer","title":"Seed"},"num_eval_checkpoints":{"type":"integer","title":"Num Eval Checkpoints","default":5}},"type":"object","required":["lora_alpha","lora_targets","learning_rate","batch_size","max_steps","seed"],"title":"GRPOHyperparameters"},"GRPOMethod":{"properties":{"type":{"type":"string","const":"grpo","title":"Type"},"hyperparameters":{"$ref":"#/components/schemas/GRPOHyperparameters"}},"type":"object","required":["type","hyperparameters"],"title":"GRPOMethod"},"GenerateDataSource":{"properties":{"range":{"anyOf":[{"type":"string","pattern":"^\\d+:\\d+$","description":"Range to evaluate, as 'start:end' (e.g. '0:200')","examples":["0:200"]},{"type":"null"}],"title":"Range","default":"0:100"},"type":{"type":"string","const":"generate","title":"Type","default":"generate"},"models":{"items":{"type":"string","minLength":1,"description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]},"type":"array","minItems":1,"title":"Models","description":"Model ids or slugs to generate with."}},"additionalProperties":false,"type":"object","required":["models"],"title":"GenerateDataSource","description":"Data source that generates completions via one or more models."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"additionalProperties":false,"type":"object","required":["ok"],"title":"HealthResponse","description":"Health check response.","examples":[{"ok":true}]},"ImageConfig":{"properties":{"quality":{"title":"Quality","description":"Render quality.","type":"string","enum":["auto","low","medium","high","standard","hd"],"x-extensible-enum":["auto","low","medium","high","standard","hd"],"nullable":true},"size":{"title":"Size","description":"Output dimensions.","type":"string","enum":["auto","256x256","512x512","1024x1024","1024x1536","1024x1792","1536x1024","1792x1024"],"x-extensible-enum":["auto","256x256","512x512","1024x1024","1024x1536","1024x1792","1536x1024","1792x1024"],"nullable":true},"background":{"title":"Background","description":"Background handling.","type":"string","enum":["auto","transparent","opaque"],"x-extensible-enum":["auto","transparent","opaque"],"nullable":true},"output_format":{"title":"Output Format","description":"Encoded image format.","type":"string","enum":["png","jpeg","webp"],"x-extensible-enum":["png","jpeg","webp"],"nullable":true},"output_compression":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Compression","description":"Compression level (0-100) for lossy output formats."},"moderation":{"title":"Moderation","description":"Moderation strictness level.","type":"string","enum":["auto","low"],"x-extensible-enum":["auto","low"],"nullable":true}},"additionalProperties":true,"type":"object","title":"ImageConfig","description":"Image output configuration (paired with ``modalities: [\"image\"]``).\n\nMirrors OpenAI's gpt-image / chat-image params and OpenRouter's\n``image_config`` passthrough."},"ImageContentPart":{"properties":{"type":{"type":"string","const":"image_url","title":"Type","description":"Content part type.","default":"image_url"},"image_url":{"$ref":"#/components/schemas/ImageURL","description":"Image URL object with 'url' and optional 'detail'."}},"type":"object","required":["image_url"],"title":"ImageContentPart","description":"Image content part in a message."},"ImageURL":{"properties":{"url":{"type":"string","title":"Url","description":"Image URL (http(s) or data URL)."},"detail":{"title":"Detail","description":"Image detail hint; 'auto' lets the provider decide.","type":"string","enum":["auto","low","high"],"x-extensible-enum":["auto","low","high"],"nullable":true}},"additionalProperties":true,"type":"object","required":["url"],"title":"ImageURL","description":"Image URL object inside an image_url content part.\n\nMirrors OpenAI's chat completions image content; ``detail`` is optional and\n``extra=\"allow\"`` keeps the door open for provider-specific extensions\n(OpenRouter occasionally adds routing hints here)."},"InferenceParams-Input":{"properties":{"provider":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider","description":"Provider/routing preferences."},"plugins":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Plugins","description":"Plugins."},"route":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route","description":"Route preference."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session id."},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","description":"Frequency penalty."},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias","description":"Logit bias."},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","description":"Include logprobs."},"top_logprobs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Logprobs","description":"Top logprobs."},"max_completion_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Completion Tokens","description":"Max completion tokens."},"max_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Tokens","description":"Max tokens."},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"Number of chat completion choices to generate (OpenAI ``n``)."},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","description":"Presence penalty."},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/ReasoningConfig"},{"type":"null"}],"description":"Reasoning config."},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"},{"type":"null"}],"title":"Response Format","description":"Response format."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed."},"service_tier":{"title":"Service Tier","description":"Service tier hint (auto/default/flex/scale/priority).","type":"string","enum":["auto","default","flex","scale","priority"],"x-extensible-enum":["auto","default","flex","scale","priority"],"nullable":true},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Stop sequences."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Temperature."},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"type":"null"}],"title":"Tool Choice","description":"Tool choice."},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools."},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parallel Tool Calls","description":"Whether the model may emit multiple tool calls in parallel."},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"Top p."},"top_k":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top K","description":"Top-k sampling (OpenRouter / Anthropic / vLLM)."},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","description":"Min-p sampling cutoff (OpenRouter / vLLM)."},"top_a":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top A","description":"Top-a sampling cutoff (OpenRouter alternate sampler)."},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","description":"Repetition penalty (OpenRouter / non-OpenAI providers)."},"image_config":{"anyOf":[{"$ref":"#/components/schemas/ImageConfig"},{"type":"null"}],"description":"Image output configuration when ``modalities`` includes 'image'."},"modalities":{"anyOf":[{"items":{"type":"string","enum":["text","image","audio"]},"type":"array"},{"type":"null"}],"title":"Modalities","description":"Output modalities to enable (text, image, audio)."},"audio":{"anyOf":[{"$ref":"#/components/schemas/AudioOutputConfig"},{"type":"null"}],"description":"Audio output configuration when ``modalities`` includes 'audio'."},"prediction":{"anyOf":[{"$ref":"#/components/schemas/PredictionContent"},{"type":"null"}],"description":"Predicted output content for faster generation."},"web_search_options":{"anyOf":[{"$ref":"#/components/schemas/WebSearchOptions"},{"type":"null"}],"description":"Web search tool configuration for supported models."},"transforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transforms","description":"OpenRouter transform pipeline names (e.g. 'middle-out')."},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset","description":"OpenRouter preset name (server-side stored param bundle)."},"bad_words":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bad Words","description":"Bad words."}},"additionalProperties":false,"type":"object","title":"InferenceParams","description":"Inference-only parameters (no messages, model, stream, etc.)."},"InferenceParams-Output":{"properties":{"provider":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider","description":"Provider/routing preferences."},"plugins":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Plugins","description":"Plugins."},"route":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route","description":"Route preference."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Session id."},"frequency_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Frequency Penalty","description":"Frequency penalty."},"logit_bias":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Logit Bias","description":"Logit bias."},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Logprobs","description":"Include logprobs."},"top_logprobs":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top Logprobs","description":"Top logprobs."},"max_completion_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Completion Tokens","description":"Max completion tokens."},"max_tokens":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Tokens","description":"Max tokens."},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"Number of chat completion choices to generate (OpenAI ``n``)."},"presence_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Presence Penalty","description":"Presence penalty."},"reasoning":{"anyOf":[{"$ref":"#/components/schemas/ReasoningConfig"},{"type":"null"}],"description":"Reasoning config."},"response_format":{"anyOf":[{"$ref":"#/components/schemas/ResponseFormatText"},{"$ref":"#/components/schemas/ResponseFormatJsonSchema"},{"$ref":"#/components/schemas/ResponseFormatJsonObject"},{"type":"null"}],"title":"Response Format","description":"Response format."},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed."},"service_tier":{"title":"Service Tier","description":"Service tier hint (auto/default/flex/scale/priority).","type":"string","enum":["auto","default","flex","scale","priority"],"x-extensible-enum":["auto","default","flex","scale","priority"],"nullable":true},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"Stop sequences."},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Temperature."},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/ToolChoiceFunction"},{"type":"null"}],"title":"Tool Choice","description":"Tool choice."},"tools":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolDefinition"},"type":"array"},{"type":"null"}],"title":"Tools","description":"Tools."},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Parallel Tool Calls","description":"Whether the model may emit multiple tool calls in parallel."},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P","description":"Top p."},"top_k":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top K","description":"Top-k sampling (OpenRouter / Anthropic / vLLM)."},"min_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min P","description":"Min-p sampling cutoff (OpenRouter / vLLM)."},"top_a":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top A","description":"Top-a sampling cutoff (OpenRouter alternate sampler)."},"repetition_penalty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Repetition Penalty","description":"Repetition penalty (OpenRouter / non-OpenAI providers)."},"image_config":{"anyOf":[{"$ref":"#/components/schemas/ImageConfig"},{"type":"null"}],"description":"Image output configuration when ``modalities`` includes 'image'."},"modalities":{"anyOf":[{"items":{"type":"string","enum":["text","image","audio"]},"type":"array"},{"type":"null"}],"title":"Modalities","description":"Output modalities to enable (text, image, audio)."},"audio":{"anyOf":[{"$ref":"#/components/schemas/AudioOutputConfig"},{"type":"null"}],"description":"Audio output configuration when ``modalities`` includes 'audio'."},"prediction":{"anyOf":[{"$ref":"#/components/schemas/PredictionContent"},{"type":"null"}],"description":"Predicted output content for faster generation."},"web_search_options":{"anyOf":[{"$ref":"#/components/schemas/WebSearchOptions"},{"type":"null"}],"description":"Web search tool configuration for supported models."},"transforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transforms","description":"OpenRouter transform pipeline names (e.g. 'middle-out')."},"preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset","description":"OpenRouter preset name (server-side stored param bundle)."},"bad_words":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bad Words","description":"Bad words."}},"additionalProperties":false,"type":"object","title":"InferenceParams","description":"Inference-only parameters (no messages, model, stream, etc.)."},"InputAudio":{"properties":{"data":{"type":"string","title":"Data","description":"Base64-encoded audio bytes."},"format":{"type":"string","enum":["wav","mp3"],"title":"Format","description":"Audio container format."}},"additionalProperties":false,"type":"object","required":["data","format"],"title":"InputAudio","description":"Audio payload inside an input_audio content part."},"InputAudioContentPart":{"properties":{"type":{"type":"string","const":"input_audio","title":"Type","description":"Content part type.","default":"input_audio"},"input_audio":{"$ref":"#/components/schemas/InputAudio","description":"Audio payload."}},"type":"object","required":["input_audio"],"title":"InputAudioContentPart","description":"Audio content part in a user message (gpt-4o-audio family)."},"Item":{"properties":{"input":{"$ref":"#/components/schemas/ChatReq"},"output":{"anyOf":[{"$ref":"#/components/schemas/ChatResRelaxed-Input"},{"type":"null"}],"description":"Chat completion output. Omit to register input-only examples."},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Optional tags for this example."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata for this example."}},"additionalProperties":false,"type":"object","required":["input"],"title":"Item"},"JsonSchemaConfig":{"properties":{"name":{"type":"string","title":"Name","description":"Schema name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Schema description."},"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema","description":"JSON Schema object."},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Strict","description":"Whether to enforce strict schema adherence."}},"type":"object","required":["name"],"title":"JsonSchemaConfig","description":"Configuration for json_schema response format."},"JudgeEvaluator":{"properties":{"object":{"type":"string","const":"evaluator.judge","title":"Object","description":"Object type.","default":"evaluator.judge"},"project_id":{"type":"string","title":"Project Id","description":"Project id."},"container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Id","description":"Container id."},"id":{"type":"string","title":"Id","description":"Evaluator id."},"name":{"type":"string","title":"Name","description":"Evaluator name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Evaluator description."},"created_at":{"type":"string","title":"Created At","description":"Creation timestamp."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"pass_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pass Threshold","description":"Optional pass threshold."},"mode":{"type":"string","enum":["pointwise","reference","pairwise"],"title":"Mode","description":"Evaluation mode: score a candidate directly, against a reference, or against a baseline.","default":"pointwise"},"api":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api","description":"API type."},"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label (if container-specific)."},"model":{"type":"string","title":"Model","description":"Judge model slug."},"prompt":{"type":"string","title":"Prompt","description":"Judge prompt."},"inference_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inference Parameters","description":"Optional inference parameters for the judge model (e.g. response_format, temperature)."}},"type":"object","required":["project_id","id","name","created_at","model","prompt"],"title":"JudgeEvaluator"},"ListResponse_Dataset_":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/Dataset"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"ListResponse[Dataset]"},"ManiacError":{"properties":{"code":{"type":"string","title":"Code","description":"Machine-readable error code."},"message":{"type":"string","title":"Message","description":"Human-readable error message."},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details","description":"Additional error details."}},"additionalProperties":false,"type":"object","required":["code","message"],"title":"ManiacError","description":"Standard Maniac API error envelope.\n\nThis matches the shape already used by v2 auth (`detail={\"error\": {...}}`).","examples":[{"code":"UNAUTHORIZED","message":"Missing API key."},{"code":"RATE_LIMIT_EXCEEDED","details":{"limit":100,"remaining":0,"retry_after":60},"message":"Rate limit exceeded. Please retry after 60 seconds."}]},"Message":{"properties":{"role":{"type":"string","enum":["system","user","assistant","developer","tool"],"title":"Role","description":"Message role."},"content":{"anyOf":[{"type":"string"},{"items":{"oneOf":[{"$ref":"#/components/schemas/TextContentPart"},{"$ref":"#/components/schemas/ImageContentPart"},{"$ref":"#/components/schemas/InputAudioContentPart"},{"$ref":"#/components/schemas/FileContentPart"}],"discriminator":{"propertyName":"type","mapping":{"file":"#/components/schemas/FileContentPart","image_url":"#/components/schemas/ImageContentPart","input_audio":"#/components/schemas/InputAudioContentPart","text":"#/components/schemas/TextContentPart"}}},"type":"array"},{"type":"null"}],"title":"Content","description":"Message content (string or list of content parts)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional name."},"tool_calls":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array"},{"type":"null"}],"title":"Tool Calls","description":"Tool calls (assistant message)."},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id","description":"Tool call ID (tool messages)."}},"additionalProperties":false,"type":"object","required":["role"],"title":"Message","description":"OpenAI-style chat message."},"ModelListItem":{"properties":{"object":{"type":"string","const":"model","title":"Object","description":"Object type.","default":"model"},"id":{"type":"string","title":"Id","description":"Model id."},"slug":{"type":"string","title":"Slug","description":"Model slug."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name."},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created","description":"Unix timestamp of when the model was added."},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length","description":"Maximum context length in tokens."},"pricing":{"$ref":"#/components/schemas/Pricing","description":"Pricing information."},"supported_parameters":{"items":{"type":"string"},"type":"array","title":"Supported Parameters","description":"Supported inference parameters."},"supported_apis":{"items":{"type":"string","enum":["chat.completions","completions","responses","embeddings","rerank","containers","models","datasets","evaluation","optimization","project.keys"]},"type":"array","title":"Supported Apis","description":"Supported APIs."},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Model provider."},"desktop_picker_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Desktop Picker Rank","description":"Optional rank for desktop picker recommendations; lower values sort first."}},"type":"object","required":["id","slug","pricing","supported_parameters","supported_apis"],"title":"ModelListItem"},"ModelListResponse":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/ModelListItem"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"ModelListResponse"},"PredictionContent":{"properties":{"type":{"type":"string","const":"content","title":"Type","description":"Prediction type.","default":"content"},"content":{"anyOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/TextContentPart"},"type":"array"}],"title":"Content","description":"Predicted content (string or list of text parts)."}},"additionalProperties":false,"type":"object","required":["content"],"title":"PredictionContent","description":"Predicted output content (OpenAI predicted outputs)."},"Pricing":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"Price per prompt token or unit."},"completion":{"type":"string","title":"Completion","description":"Price per completion token or unit."},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image","description":"Price per image input."},"request":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request","description":"Price per request."},"discount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount","description":"Discount rate."},"web_search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Web Search","description":"Price per web search call."},"image_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Output","description":"Price per image output."},"input_cache_read":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Cache Read","description":"Price per cache read."},"internal_reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Reasoning","description":"Price for internal reasoning tokens."}},"additionalProperties":true,"type":"object","required":["prompt","completion"],"title":"Pricing"},"RLMResponsesError":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"additionalProperties":false,"type":"object","required":["code","message"],"title":"RLMResponsesError"},"RLMResponsesOutputMessage":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","const":"message","title":"Type","default":"message"},"status":{"type":"string","const":"completed","title":"Status","default":"completed"},"role":{"type":"string","const":"assistant","title":"Role","default":"assistant"},"content":{"items":{"$ref":"#/components/schemas/RLMResponsesOutputText"},"type":"array","title":"Content"}},"additionalProperties":false,"type":"object","required":["id","content"],"title":"RLMResponsesOutputMessage"},"RLMResponsesOutputText":{"properties":{"type":{"type":"string","const":"output_text","title":"Type","default":"output_text"},"text":{"type":"string","title":"Text"},"annotations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Annotations"}},"additionalProperties":false,"type":"object","required":["text"],"title":"RLMResponsesOutputText"},"RLMResponsesResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"response","title":"Object","default":"response"},"created_at":{"type":"integer","title":"Created At"},"status":{"type":"string","enum":["in_progress","completed","failed"],"title":"Status"},"model":{"type":"string","title":"Model"},"store":{"type":"boolean","const":false,"title":"Store","default":false},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"output":{"anyOf":[{"items":{"$ref":"#/components/schemas/RLMResponsesOutputMessage"},"type":"array"},{"type":"null"}],"title":"Output"},"output_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Text"},"usage":{"anyOf":[{"$ref":"#/components/schemas/RLMResponsesUsage"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/RLMResponsesError"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","created_at","status","model"],"title":"RLMResponsesResponse","examples":[{"created_at":1710000000,"id":"resp_123","metadata":{"source":"dashboard"},"model":"openai/gpt-4o","object":"response","output":[{"content":[{"annotations":[],"text":"Summary goes here.","type":"output_text"}],"id":"msg_123","role":"assistant","status":"completed","type":"message"}],"output_text":"Summary goes here.","status":"completed","store":false,"usage":{"input_tokens":120,"output_tokens":30,"total_tokens":150}},{"created_at":1710000000,"id":"resp_abc123","metadata":{"source":"dashboard"},"model":"openai/gpt-4o","object":"response","status":"in_progress","store":false}]},"RLMResponsesUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"additionalProperties":false,"type":"object","required":["input_tokens","output_tokens","total_tokens"],"title":"RLMResponsesUsage"},"ReasoningConfig":{"properties":{"effort":{"title":"Effort","description":"Reasoning effort level.","type":"string","enum":["none","minimal","low","medium","high","xhigh"],"x-extensible-enum":["none","minimal","low","medium","high","xhigh"],"nullable":true},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens","description":"Maximum tokens to allocate to reasoning. Used by providers that expose a thinking-token budget (Anthropic, Gemini thinking, some Alibaba Qwen models mapped to `thinking_budget`)."},"exclude":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Exclude","description":"If true, the model still performs reasoning internally but the reasoning tokens are omitted from the response."},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"Explicitly enable or disable reasoning. When true, reasoning runs at provider-default settings unless `effort` or `max_tokens` is set."}},"additionalProperties":false,"type":"object","title":"ReasoningConfig","description":"Reasoning configuration for reasoning models.\n\nMatches OpenRouter's chat-completions reasoning schema. See\nhttps://openrouter.ai/docs/use-cases/reasoning-tokens for provider-specific\nsemantics (effort -> OpenAI/Grok, max_tokens -> Anthropic/Gemini/Qwen)."},"RegisterOutputChoice":{"properties":{"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index","description":"Choice index."},"message":{"$ref":"#/components/schemas/RegisterOutputMessage"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason","description":"Reason the generation finished."}},"additionalProperties":true,"type":"object","required":["message"],"title":"RegisterOutputChoice"},"RegisterOutputMessage":{"properties":{"role":{"type":"string","title":"Role","description":"Message role (system, user, assistant)."},"content":{"anyOf":[{"type":"string"},{"items":{},"type":"array"},{"type":"null"}],"title":"Content","description":"Message content (string or structured parts)."}},"additionalProperties":true,"type":"object","required":["role"],"title":"RegisterOutputMessage"},"RegisterReq":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Item"},"type":"array","title":"Items","description":"List of chat input/output examples."},"container":{"type":"string","title":"Container","description":"Container label to associate these examples with.","examples":["maniac:my-container"]}},"additionalProperties":false,"type":"object","required":["items","container"],"title":"RegisterChatCompletionsRequest","description":"Register completed chat examples for evaluation or analytics."},"RegisterRes":{"properties":{"ok":{"type":"boolean","title":"Ok","description":"Whether the register operation succeeded."},"container":{"type":"string","title":"Container","description":"Container label used for registration."},"summary":{"additionalProperties":true,"type":"object","title":"Summary","description":"Summary of inserted and skipped items."},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors","description":"Up to 200 validation or upsert errors."}},"additionalProperties":false,"type":"object","required":["ok","container","summary","errors"],"title":"RegisterChatCompletionsResponse","examples":[{"container":"maniac:my-container","errors":[],"ok":true,"summary":{"inserted":10,"skipped":0}}]},"ResponseFormatJsonObject":{"properties":{"type":{"type":"string","const":"json_object","title":"Type","description":"Format type.","default":"json_object"}},"type":"object","title":"ResponseFormatJsonObject","description":"JSON object response format (legacy JSON mode)."},"ResponseFormatJsonSchema":{"properties":{"type":{"type":"string","const":"json_schema","title":"Type","description":"Format type.","default":"json_schema"},"json_schema":{"$ref":"#/components/schemas/JsonSchemaConfig","description":"JSON schema configuration."}},"type":"object","required":["json_schema"],"title":"ResponseFormatJsonSchema","description":"Structured JSON output via a supplied schema."},"ResponseFormatText":{"properties":{"type":{"type":"string","const":"text","title":"Type","description":"Format type.","default":"text"}},"type":"object","title":"ResponseFormatText","description":"Plain text response format (default)."},"SFTHyperparameters":{"properties":{"max_steps":{"type":"integer","title":"Max Steps"},"lora_targets":{"items":{"type":"string"},"type":"array","title":"Lora Targets"},"lora_dim":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"integer"}],"title":"Lora Dim"},"lora_alpha":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"integer"}],"title":"Lora Alpha"},"per_device_train_batch_size":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"integer"}],"title":"Per Device Train Batch Size"},"gradient_accumulation_steps":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"integer"}],"title":"Gradient Accumulation Steps"},"warmup_ratio":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"number"}],"title":"Warmup Ratio"},"optim":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}],"title":"Optim"},"weight_decay":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"number"}],"title":"Weight Decay"},"lr_scheduler_type":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}],"title":"Lr Scheduler Type"},"learning_rate":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"number"}],"title":"Learning Rate"},"seed":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"integer"}],"title":"Seed"},"mode":{"anyOf":[{"items":{"type":"string","enum":["autoregression","classification","regression"]},"type":"array"},{"type":"string","enum":["autoregression","classification","regression"]}],"title":"Mode"},"num_eval_checkpoints":{"type":"integer","title":"Num Eval Checkpoints","default":7},"train_range":{"type":"string","title":"Train Range","default":"500:20000"},"eval_range":{"type":"string","title":"Eval Range","default":"0:500"},"top_c":{"type":"integer","title":"Top C","default":10},"filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"},"max_seq_len":{"type":"integer","title":"Max Seq Len","default":2048},"max_gen_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Gen Tokens"},"target_key":{"type":"string","title":"Target Key","default":"relevance"},"classification_labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Classification Labels"}},"additionalProperties":true,"type":"object","required":["max_steps","lora_targets","lora_dim","lora_alpha","per_device_train_batch_size","gradient_accumulation_steps","warmup_ratio","optim","weight_decay","lr_scheduler_type","learning_rate","seed","mode"],"title":"SFTHyperparameters"},"SFTMethod":{"properties":{"type":{"type":"string","const":"sft","title":"Type"},"hyperparameters":{"$ref":"#/components/schemas/SFTHyperparameters"}},"type":"object","required":["type","hyperparameters"],"title":"SFTMethod"},"StreamOptions":{"properties":{"include_usage":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Usage","description":"Include a final chunk with token usage statistics."}},"type":"object","title":"StreamOptions","description":"Options for streaming responses."},"TextContentPart":{"properties":{"type":{"type":"string","const":"text","title":"Type","description":"Content part type.","default":"text"},"text":{"type":"string","title":"Text","description":"Text content."}},"type":"object","required":["text"],"title":"TextContentPart","description":"Text content part in a message."},"ToolCall":{"properties":{"id":{"type":"string","title":"Id","description":"Tool call id."},"type":{"type":"string","const":"function","title":"Type","description":"Tool call type.","default":"function"},"function":{"$ref":"#/components/schemas/FunctionCall","description":"Function call details."}},"type":"object","required":["id","function"],"title":"ToolCall","description":"A tool call emitted by the model."},"ToolChoiceFunction":{"properties":{"type":{"type":"string","const":"function","title":"Type","description":"Tool choice type.","default":"function"},"function":{"$ref":"#/components/schemas/ToolChoiceFunctionName","description":"Function to call."}},"type":"object","required":["function"],"title":"ToolChoiceFunction","description":"Force the model to call a specific function."},"ToolChoiceFunctionName":{"properties":{"name":{"type":"string","title":"Name","description":"Function name."}},"type":"object","required":["name"],"title":"ToolChoiceFunctionName","description":"Specifies a function name to force-call."},"ToolDefinition":{"properties":{"type":{"type":"string","const":"function","title":"Type","description":"Tool type.","default":"function"},"function":{"$ref":"#/components/schemas/FunctionDefinition","description":"Function definition."}},"type":"object","required":["function"],"title":"ToolDefinition","description":"A tool the model may call."},"TraceContext":{"properties":{"id":{"type":"string","title":"Id","description":"External trace identifier used to group requests."},"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id","description":"Optional span identifier within the trace."},"parent_span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Span Id","description":"Optional parent span identifier."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional trace name."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Optional trace source, e.g. langchain."},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata associated with the trace."}},"additionalProperties":false,"type":"object","required":["id"],"title":"TraceContext"},"TraceListItem":{"properties":{"id":{"type":"string","title":"Id","description":"External trace identifier (`trace.id`)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional trace name."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Optional trace source."},"first_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen","description":"Timestamp of the first request recorded for this trace."},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen","description":"Timestamp of the most recent request recorded for this trace."},"request_count":{"type":"integer","minimum":0.0,"title":"Request Count","description":"Number of inference log rows recorded for this trace."},"container_count":{"type":"integer","minimum":0.0,"title":"Container Count","description":"Number of distinct containers involved in this trace."},"spend":{"type":"integer","minimum":0.0,"title":"Spend","description":"Total spend across all requests in this trace."},"success_count":{"type":"integer","minimum":0.0,"title":"Success Count","description":"Number of successful requests recorded for this trace."},"error_count":{"type":"integer","minimum":0.0,"title":"Error Count","description":"Number of errored requests recorded for this trace."}},"additionalProperties":false,"type":"object","required":["id","request_count","container_count","spend","success_count","error_count"],"title":"TraceListItem","examples":[{"container_count":2,"error_count":1,"first_seen":"2026-03-18T12:00:00Z","id":"tr_customer_followup_123","last_seen":"2026-03-18T12:00:04Z","name":"customer-followup","request_count":3,"source":"my-app","spend":12345,"success_count":2}]},"TraceListRes":{"properties":{"object":{"type":"string","const":"list","title":"Object","description":"Object type identifier.","default":"list"},"data":{"items":{"$ref":"#/components/schemas/TraceListItem"},"type":"array","title":"Data","description":"Returned items."},"total":{"type":"integer","minimum":0.0,"title":"Total","description":"Total number of items available for this resource.","examples":[0,42]}},"additionalProperties":false,"type":"object","required":["data","total"],"title":"TraceListRes","description":"List response for project-scoped traces."},"TraceRes":{"properties":{"id":{"type":"string","title":"Id","description":"External trace identifier (`trace.id`)."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional trace name."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Optional trace source."},"trace_context":{"anyOf":[{"$ref":"#/components/schemas/TraceContext"},{"type":"null"}],"description":"Most recent normalized trace context stored for this trace."},"first_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen","description":"Timestamp of the first request recorded for this trace."},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen","description":"Timestamp of the most recent request recorded for this trace."},"request_count":{"type":"integer","minimum":0.0,"title":"Request Count","description":"Number of inference log rows recorded for this trace."},"container_count":{"type":"integer","minimum":0.0,"title":"Container Count","description":"Number of distinct containers involved in this trace."},"error_count":{"type":"integer","minimum":0.0,"title":"Error Count","description":"Number of errored requests recorded for this trace."},"spans":{"items":{"$ref":"#/components/schemas/TraceSpanRes"},"type":"array","title":"Spans","description":"Grouped spans for this trace."}},"additionalProperties":false,"type":"object","required":["id","request_count","container_count","error_count"],"title":"Trace","examples":[{"container_count":2,"error_count":1,"first_seen":"2026-03-18T12:00:00Z","id":"tr_customer_followup_123","last_seen":"2026-03-18T12:00:04Z","name":"customer-followup","request_count":3,"source":"my-app","spans":[{"attempt_count":2,"container_count":1,"first_seen":"2026-03-18T12:00:01Z","inference_log_ids":["7a2cb0d6-d04b-4b45-bfbb-9c7d18850f22","dbce54ce-411f-4ad7-b3aa-09aa66cc70ea"],"last_seen":"2026-03-18T12:00:04Z","latest_inference_log_id":"dbce54ce-411f-4ad7-b3aa-09aa66cc70ea","latest_status":"success","parent_span_id":"planner","span_id":"writer"}],"trace_context":{"id":"tr_customer_followup_123","name":"customer-followup","source":"my-app"}}]},"TraceSpanRes":{"properties":{"span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Span Id","description":"Logical span identifier within the trace."},"parent_span_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Span Id","description":"Optional parent span identifier."},"first_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Seen","description":"Timestamp of the first attempt recorded for this span."},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen","description":"Timestamp of the most recent attempt recorded for this span."},"attempt_count":{"type":"integer","minimum":0.0,"title":"Attempt Count","description":"Number of attempts recorded for this logical span."},"inference_log_ids":{"items":{"type":"string"},"type":"array","title":"Inference Log Ids","description":"Chronological list of inference log ids (`task_inference_logs.id`) for this span."},"latest_inference_log_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Inference Log Id","description":"Inference log id for the most recent attempt."},"latest_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Status","description":"Status for the most recent attempt."},"container_count":{"type":"integer","minimum":0.0,"title":"Container Count","description":"Number of distinct containers involved in this span."}},"additionalProperties":false,"type":"object","required":["attempt_count","container_count"],"title":"TraceSpan"},"UpdateContainerReq":{"properties":{"default_parameters":{"anyOf":[{"$ref":"#/components/schemas/InferenceParams-Input"},{"type":"null"}],"description":"Updated default parameters."},"default_system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default System Prompt","description":"Updated system prompt."},"default_model":{"anyOf":[{"type":"string","minLength":1,"description":"Resource id or label","examples":["file_abc123","my-file-label","92ade949-4a76-4cb4-81e9-c3b683ea4f2e"]},{"type":"null"}],"title":"Default Model","description":"Updated default model id or slug."}},"additionalProperties":false,"type":"object","title":"UpdateContainerReq","description":"Patchable fields for a container."},"UpdateEvaluatorReq":{"properties":{"container":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container","description":"Container label."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Judge model slug."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Judge prompt."},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Code evaluator source."},"requirements":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requirements","description":"Optional requirements list."},"pass_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pass Threshold","description":"Optional pass threshold."},"mode":{"title":"Mode","description":"Evaluation mode.","type":"string","enum":["pointwise","reference","pairwise"],"x-extensible-enum":["pointwise","reference","pairwise"],"nullable":true},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Evaluator name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Evaluator description."},"api":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api","description":"API type."},"inference_parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inference Parameters","description":"Optional inference parameters for judge evaluators (e.g. response_format, temperature)."}},"additionalProperties":false,"type":"object","title":"UpdateEvaluatorReq","description":"Patchable fields for an evaluator."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebSearchApproximateLocation":{"properties":{"type":{"type":"string","const":"approximate","title":"Type","description":"Location type.","default":"approximate"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO country code."},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"State/region name."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"City name."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA timezone."}},"additionalProperties":true,"type":"object","title":"WebSearchApproximateLocation","description":"Approximate user location used to bias web search results."},"WebSearchOptions":{"properties":{"search_context_size":{"title":"Search Context Size","description":"How much context the search tool should pull in.","type":"string","enum":["low","medium","high"],"x-extensible-enum":["low","medium","high"],"nullable":true},"user_location":{"anyOf":[{"$ref":"#/components/schemas/WebSearchApproximateLocation"},{"type":"null"}],"description":"Approximate user location."}},"additionalProperties":true,"type":"object","title":"WebSearchOptions","description":"Configuration for the built-in web search tool on supported models."}},"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"API key in Authorization header using Bearer <token>."}}},"tags":[{"name":"Chat","description":"Chat completion endpoints (OpenAI-compatible)."},{"name":"RLM","description":"Recursive Language Model endpoints."},{"name":"Traces","description":"Trace lookup endpoints."},{"name":"Containers","description":"Container management endpoints."},{"name":"Files","description":"File upload and management endpoints."},{"name":"Models","description":"Model listing and metadata endpoints."},{"name":"Evaluation","description":"Evaluation and evaluator endpoints."},{"name":"Datasets","description":"Dataset management endpoints."},{"name":"Optimization","description":"Optimization run endpoints."},{"name":"Health","description":"Health and status endpoints."}],"security":[{"ApiKeyAuth":[]}]}