Note: This page is auto-generated from SDK validation code. Parameters and types are extracted automatically and will update when the code changes.
MIPRO Offline (Multi-prompt Instruction Proposal Optimizer) is an algorithm for optimizing prompts through systematic instruction proposal and evaluation in offline mode, where the backend orchestrates all rollouts by calling your task app. Endpoint:
POST /api/policy-optimization/online/jobs
Authentication: Bearer token via Authorization: Bearer $SYNTH_API_KEY
Overview
In offline mode:- Backend orchestrates: Backend calls your task app for all rollouts
- Tunneling required: Task app must be publicly accessible
- Automatic evaluation: Backend handles all rollout execution and reward collection
- No local code needed: Just provide task app URL and configuration
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
mipro.mode | string | Yes | Must be "offline" |
mipro.bootstrap_train_seeds | array[int] | Yes | Initial training seeds for bootstrap phase |
mipro.val_seeds | array[int] | Yes | Validation seeds for evaluation |
mipro.proposer | object | Yes | Proposer configuration for generating prompt proposals |
mipro.proposer.max_tokens | int | No | Maximum tokens for proposer output (default: 512) |
mipro.proposer.mode | string | Yes | Proposer generation mode: ‘instruction_only’ |
mipro.proposer.model | string | Yes | Model for generating proposals |
mipro.proposer.provider | string | Yes | Provider for proposer model |
mipro.proposer.temperature | float | No | Temperature for proposer generation (default: 0.7) |
task_app_url | string | Yes | Publicly accessible URL of your task app |
Workflow
- Set up task app: Ensure your task app is publicly accessible (use Cloudflare tunnel for local development)
- Register API key: Register
ENVIRONMENT_API_KEYwith the backend - Create job: Submit MIPRO job with
mode: "offline"andtask_app_url - Backend orchestrates: Backend automatically:
- Calls your task app for rollouts
- Collects rewards
- Generates new prompt proposals
- Evaluates candidates
- Poll for results: Check job status until completion
Response
Polling for Completion
UseGET /api/policy-optimization/online/jobs/{job_id} to check status:
Notes
- Tunneling required: Task app must be publicly accessible (use Cloudflare tunnel for local development)
- Environment API key:
ENVIRONMENT_API_KEYmust be registered with the backend - Backend orchestrates: Backend handles all rollout execution and reward collection automatically
- No local rollout code: You don’t need to write rollout loops - backend handles everything
- Proposer API key: Automatically resolved from backend environment (
OPENAI_API_KEYorPROD_OPENAI_API_KEY)
See Also
- MIPRO Online API - Online mode documentation
- MIPRO SDK Reference - SDK usage guide
- Policy Optimization API - General policy optimization documentation