openapi: 3.0.3 info: title: OpenPipe Chat Models API description: The public API for reporting API calls to OpenPipe version: 0.1.1 servers: - url: https://api.openpipe.ai/api/v1 tags: - name: Models paths: /models: post: operationId: createModel description: Train a new model. security: - Authorization: [] requestBody: required: true content: application/json: schema: type: object properties: datasetId: type: string slug: type: string pruningRuleIds: type: array items: type: string default: [] trainingConfig: anyOf: - type: object properties: provider: type: string enum: - openpipe baseModel: type: string description: 'The base model to train from. This could be a base model name or the slug of a previously trained model. Supported base models include: `meta-llama/Meta-Llama-3.1-8B-Instruct`, `meta-llama/Meta-Llama-3.1-70B-Instruct`, `meta-llama/Llama-3.3-70B-Instruct`, `meta-llama/Llama-3.1-8B`, `meta-llama/Llama-3.1-70B`, `Qwen/Qwen2.5-72B-Instruct`, `Qwen/Qwen2.5-Coder-7B-Instruct`, `Qwen/Qwen2.5-Coder-32B-Instruct`, `Qwen/Qwen2.5-1.5B-Instruct`, `Qwen/Qwen2.5-7B-Instruct`, `Qwen/Qwen2-VL-7B-Instruct`, `Qwen/Qwen2.5-14B-Instruct`, `Qwen/Qwen3-8B`, `Qwen/Qwen3-14B`, `mistralai/Mistral-Nemo-Base-2407`, `mistralai/Mistral-Small-24B-Base-2501`, `meta-llama/Llama-3.2-1B-Instruct`, `meta-llama/Llama-3.2-3B-Instruct`, `google/gemma-3-1b-it`, `google/gemma-3-4b-it`, `google/gemma-3-12b-it`, `google/gemma-3-27b-it`' enable_sft: type: boolean default: true description: Whether to enable SFT training. If true, the model will be trained using SFT. Can be used in conjunction with DPO training. enable_preference_tuning: type: boolean description: Whether to enable DPO training. If true, the model will be trained using DPO. Can be used in conjunction with SFT training. default: false sft_hyperparameters: type: object properties: batch_size: anyOf: - type: string enum: - auto - type: number learning_rate_multiplier: type: number num_epochs: type: number additionalProperties: false default: {} description: Hyperparameters for SFT training job. Ensure `enable_sft` is true. If no SFT hyperparameters are provided, default values will be used. preference_hyperparameters: type: object properties: variant: anyOf: - type: string enum: - DPO - type: string enum: - APO Zero learning_rate_multiplier: type: number num_epochs: type: number training_beta: type: number adapter_weight: type: number additionalProperties: false default: {} description: Hyperparameters for DPO training job. Ensure `enable_preference_tuning` is true. If no preference hyperparameters are provided, default values will be used. hyperparameters: type: object properties: is_sft_enabled: type: boolean default: true batch_size: anyOf: - type: string enum: - auto - type: number learning_rate_multiplier: type: number num_epochs: type: number is_preference_tuning_enabled: type: boolean preference_tuning_variant: anyOf: - type: string enum: - DPO - type: string enum: - APO Zero preference_tuning_learning_rate_multiplier: type: number preference_tuning_num_epochs: type: number preference_tuning_training_beta: type: number preference_tuning_adapter_weight: type: number additionalProperties: false description: 'DEPRECATED: Use the `sft_hyperparameters` and `preference_hyperparameters` fields instead.' required: - provider - baseModel additionalProperties: false - type: object properties: provider: type: string enum: - openpipeReward baseModel: type: string description: 'The base model to train from. This could be a base model name or the slug of a previously trained model. Supported base models include: `meta-llama/Llama-3.2-1B-Instruct`, `meta-llama/Llama-3.2-3B-Instruct`, `meta-llama/Meta-Llama-3.1-8B-Instruct`, `Qwen/Qwen2.5-0.5B-Instruct`, `Qwen/Qwen2.5-1.5B-Instruct`, `Qwen/Qwen2.5-3B-Instruct`, `Qwen/Qwen2.5-7B-Instruct`, `Qwen/Qwen3-8B`' hyperparameters: type: object properties: batch_size: anyOf: - type: string enum: - auto - type: number learning_rate_multiplier: type: number num_epochs: type: number additionalProperties: false default: {} required: - provider - baseModel additionalProperties: false - type: object properties: provider: type: string enum: - openai baseModel: type: string enum: - gpt-4.1-2025-04-14 - gpt-4.1-mini-2025-04-14 - gpt-4o-mini-2024-07-18 - gpt-4o-2024-08-06 - gpt-3.5-turbo-0125 enable_sft: type: boolean default: true description: Whether to enable SFT training. If true, the model will be trained using SFT. Can be used in conjunction with DPO training. enable_preference_tuning: type: boolean description: Whether to enable DPO training. If true, the model will be trained using DPO. Can be used in conjunction with SFT training. default: false sft_hyperparameters: type: object properties: batch_size: type: number learning_rate_multiplier: type: number n_epochs: type: number additionalProperties: false default: {} description: Hyperparameters for SFT training job. Ensure `enable_sft` is true. If no SFT hyperparameters are provided, default values will be used. preference_hyperparameters: type: object properties: beta: type: number batch_size: type: number learning_rate_multiplier: type: number n_epochs: type: number additionalProperties: false default: {} description: Hyperparameters for DPO training job. Ensure `enable_preference_tuning` is true. If no preference hyperparameters are provided, default values will be used. hyperparameters: type: object properties: is_sft_enabled: type: boolean default: true batch_size: type: number learning_rate_multiplier: type: number n_epochs: type: number is_preference_tuning_enabled: type: boolean preference_tuning_beta: type: number preference_tuning_batch_size: type: number preference_tuning_learning_rate_multiplier: type: number preference_tuning_n_epochs: type: number additionalProperties: false description: 'DEPRECATED: Use the `sft_hyperparameters` and `preference_hyperparameters` fields instead.' required: - provider - baseModel additionalProperties: false - type: object properties: provider: type: string enum: - gemini baseModel: type: string enum: - models/gemini-1.0-pro-001 - models/gemini-1.5-flash-001-tuning sft_hyperparameters: type: object properties: epochs: type: number batch_size: type: number learning_rate: type: number learning_rate_multiplier: type: number additionalProperties: false default: {} description: Hyperparameters for SFT training job. If no SFT hyperparameters are provided, default values will be used. hyperparameters: type: object properties: epochs: type: number batch_size: type: number learning_rate: type: number learning_rate_multiplier: type: number additionalProperties: false description: 'DEPRECATED: Use the `sft_hyperparameters` field instead.' required: - provider - baseModel additionalProperties: false defaultTemperature: type: number required: - datasetId - slug - trainingConfig additionalProperties: false parameters: [] responses: '200': description: Successful response content: application/json: schema: type: object properties: id: type: string name: type: string object: type: string enum: - model description: type: string nullable: true created: type: string updated: type: string openpipe: type: object properties: baseModel: type: string hyperparameters: type: object additionalProperties: {} nullable: true status: type: string enum: - PENDING - TRAINING - DEPLOYED - ERROR - DEPRECATED - PENDING_DEPRECATION - QUEUED - PROVISIONING datasetId: type: string errorMessage: type: string nullable: true required: - baseModel - hyperparameters - status - datasetId - errorMessage additionalProperties: false contextWindow: type: number maxCompletionTokens: type: number capabilities: type: array items: type: string enum: - chat - tools - json pricing: type: object properties: chatIn: type: number description: $/million tokens chatOut: type: number description: $/million tokens required: - chatIn - chatOut additionalProperties: false owned_by: type: string required: - id - name - object - description - created - updated - openpipe - contextWindow - maxCompletionTokens - capabilities - pricing - owned_by additionalProperties: false default: $ref: '#/components/responses/error' tags: - Models get: operationId: listModels description: List all models for a project. security: - Authorization: [] parameters: [] responses: '200': description: Successful response content: application/json: schema: type: object properties: object: type: string enum: - list data: type: array items: type: object properties: id: type: string name: type: string object: type: string enum: - model description: type: string nullable: true created: type: string updated: type: string openpipe: type: object properties: baseModel: type: string hyperparameters: type: object additionalProperties: {} nullable: true status: type: string enum: - PENDING - TRAINING - DEPLOYED - ERROR - DEPRECATED - PENDING_DEPRECATION - QUEUED - PROVISIONING datasetId: type: string errorMessage: type: string nullable: true required: - baseModel - hyperparameters - status - datasetId - errorMessage additionalProperties: false contextWindow: type: number maxCompletionTokens: type: number capabilities: type: array items: type: string enum: - chat - tools - json pricing: type: object properties: chatIn: type: number description: $/million tokens chatOut: type: number description: $/million tokens required: - chatIn - chatOut additionalProperties: false owned_by: type: string required: - id - name - object - description - created - updated - openpipe - contextWindow - maxCompletionTokens - capabilities - pricing - owned_by additionalProperties: false required: - object - data additionalProperties: false default: $ref: '#/components/responses/error' tags: - Models /models/{modelSlug}: get: operationId: getModel description: Get a model by ID. security: - Authorization: [] parameters: - name: modelSlug in: path required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: type: object properties: id: type: string name: type: string object: type: string enum: - model description: type: string nullable: true created: type: string updated: type: string openpipe: type: object properties: baseModel: type: string hyperparameters: type: object additionalProperties: {} nullable: true status: type: string enum: - PENDING - TRAINING - DEPLOYED - ERROR - DEPRECATED - PENDING_DEPRECATION - QUEUED - PROVISIONING datasetId: type: string errorMessage: type: string nullable: true required: - baseModel - hyperparameters - status - datasetId - errorMessage additionalProperties: false contextWindow: type: number maxCompletionTokens: type: number capabilities: type: array items: type: string enum: - chat - tools - json pricing: type: object properties: chatIn: type: number description: $/million tokens chatOut: type: number description: $/million tokens required: - chatIn - chatOut additionalProperties: false owned_by: type: string required: - id - name - object - description - created - updated - openpipe - contextWindow - maxCompletionTokens - capabilities - pricing - owned_by additionalProperties: false default: $ref: '#/components/responses/error' tags: - Models delete: operationId: deleteModel description: Delete an existing model. security: - Authorization: [] parameters: - name: modelSlug in: path required: true schema: type: string responses: '200': description: Successful response content: application/json: schema: type: object properties: id: type: string object: type: string enum: - model deleted: type: boolean required: - id - object - deleted additionalProperties: false default: $ref: '#/components/responses/error' tags: - Models components: responses: error: description: Error response content: application/json: schema: type: object properties: message: type: string code: type: string issues: type: array items: type: object properties: message: type: string required: - message additionalProperties: false required: - message - code additionalProperties: false securitySchemes: Authorization: type: http scheme: bearer