Skip to main content
GET
/
v1
/
jobs
/
{job_id}
/
results
Get Results
curl --request GET \
  --url https://api.example.com/v1/jobs/{job_id}/results

Request

Headers

HeaderRequiredDescription
X-API-KeyYesYour PromptForge API key

Path parameters

ParameterTypeDescription
job_idstring (UUID)The job ID returned from POST /v1/jobs/init

Example request

curl
curl https://api.promptforge.dev/v1/jobs/3f7a1c2e-.../results \
  -H "X-API-Key: $PROMPTFORGE_API_KEY"
Python
import requests

res = requests.get(
    f"https://api.promptforge.dev/v1/jobs/{job_id}/results",
    headers={"X-API-Key": "your-api-key"}
)
data = res.json()

for file in data["files"]:
    print(file["filename"], file["url"])

Response

Status: 200 OK
FieldTypeDescription
job_idstringJob identifier
statusstringWill always be COMPLETED on a 200 response
filesarrayList of result files available for download
files[].filenamestringFile name (e.g. results_part_001.jsonl, errors.jsonl)
files[].urlstringPre-signed GCS URL — download the file directly from here
files[].expires_atstring (ISO 8601)When the signed URL expires
{
  "job_id": "3f7a1c2e-4b5d-6e7f-8a9b-0c1d2e3f4a5b",
  "status": "COMPLETED",
  "files": [
    {
      "filename": "results_part_001.jsonl",
      "url": "https://storage.googleapis.com/promptforge-output/client-xyz/3f7a1c2e/results_part_001.jsonl?X-Goog-Signature=...",
      "expires_at": "2024-01-15T12:00:00Z"
    },
    {
      "filename": "errors.jsonl",
      "url": "https://storage.googleapis.com/promptforge-output/client-xyz/3f7a1c2e/errors.jsonl?X-Goog-Signature=...",
      "expires_at": "2024-01-15T12:00:00Z"
    }
  ]
}
Signed URLs expire 60 minutes after this response is issued. Download your files within that window.

Result file format

results_part_NNN.jsonl

Large jobs are split into multiple result files (each up to a few thousand rows). Each line:
{"prompt_id": "p001", "result": "The Eiffel Tower...", "model": "gpt-4o-mini", "tokens_used": 24}
FieldDescription
prompt_idThe ID you provided in the input file
resultThe LLM’s response text
modelModel that processed this prompt
tokens_usedTotal tokens consumed for this prompt

errors.jsonl

Prompts that failed after exhausting all retries:
{"prompt_id": "p042", "error": "rate_limit_exceeded", "attempts": 3}
If no prompts failed, errors.jsonl will still be present but empty.

Downloading all files

# Download all result files
for url in $(curl -s https://api.promptforge.dev/v1/jobs/$JOB_ID/results \
  -H "X-API-Key: $PROMPTFORGE_API_KEY" | jq -r '.files[].url'); do
  curl -O -J "$url"
done

Errors

StatusWhen
401Missing or invalid X-API-Key
404Job not found, or belongs to a different client
409Job is not yet COMPLETED — poll /status first