Init Job
API Reference
Init Job
Create a new batch job and get a signed URL to upload your prompts file.
POST
Init Job
Request
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your PromptForge API key |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | Yes | LLM provider. One of: openai, anthropic, gemini, mistral |
model | string | Yes | Model name as accepted by the provider (e.g. gpt-4o-mini) |
max_retries | integer | No | Max retries per prompt on transient errors. Default: 3 |
rpm | integer | No | Override requests-per-minute limit. If omitted, PromptForge learns it automatically. |
tpm | integer | No | Override tokens-per-minute limit. If omitted, PromptForge learns it automatically. |
If you omit
rpm and tpm, PromptForge uses a slow-start algorithm to discover your actual provider rate limits dynamically. This is the recommended approach.Example request
curl
Python
Response
Status:202 Accepted
| Field | Type | Description |
|---|---|---|
job_id | string (UUID) | Unique identifier for this job. Use it for all subsequent calls. |
upload_url | string | Pre-signed GCS URL. PUT your prompts.jsonl here. |
expires_at | string (ISO 8601) | When the upload URL expires. |
Errors
| Status | When |
|---|---|
400 | Missing required fields or malformed JSON |
401 | Missing or invalid X-API-Key |
422 | Unsupported provider or model value |
Next step
After a202 response, upload your prompts.jsonl file to the upload_url using a PUT request:

