Benchmark LLM servers by replaying pre-built API request bodies verbatim.
The raw_payload dataset type replays complete API request bodies exactly as written in your JSONL files. Unlike other dataset types where AIPerf constructs the request payload from structured fields, raw payload replay sends each JSON object directly to the server with no transformation.
This is useful when you:
The loader supports two input modes, selected automatically based on whether --input-file points to a file or a directory.
Each line in the JSONL file is a complete API request payload. Each line becomes a separate single-turn conversation.
Each .jsonl file in the directory is one multi-turn conversation. Lines within a file are ordered turns. Files are processed in sorted alphabetical order.
Each line must be a valid JSON object containing at minimum a messages key with a list value. Any additional fields (model, temperature, max_tokens, tools, stream, etc.) are preserved and sent verbatim.
Each file represents a conversation. Each line carries the full message history for that point in the conversation:
session_001.jsonl:
When --custom-dataset-type is not specified, AIPerf auto-detects raw payload format by checking the first non-empty line for a messages key with a list value. In directory mode, it checks the first .jsonl file found.
Auto-detection rejects records that contain a conversation_id key or a data key with a list value (to avoid conflicts with other dataset formats). If your payloads include these keys, use --custom-dataset-type raw_payload explicitly.
Since auto-detection recognizes files with messages arrays, you can omit --custom-dataset-type:
Raw payloads work with any endpoint type. The endpoint controls only response parsing and URL path — payload formatting is always bypassed when raw payloads are present.
Using a regular endpoint type (e.g., the default chat) is recommended because it provides structured response parsing (token counts, finish reasons, choices) instead of generic auto-detection.
For non-standard APIs where no built-in endpoint matches, use --endpoint-type raw. The raw endpoint does not append a URL path (you must include the full path in --url) and parses responses using auto-detection. For non-standard response formats, you can specify a JMESPath expression via --extra-inputs response_field:<expression> to extract the relevant field.
Raw payload conversations use message_array_with_responses context mode by default. Each turn is sent exactly as written — AIPerf does not accumulate prior turns or inject server responses into subsequent requests.
This is the correct behavior because raw payloads already contain the complete message history for each turn. In directory mode, each line in a session file should include all prior context needed for that point in the conversation (see the multi-turn examples above).
--url only when using --endpoint-type raw. Other endpoint types append the path automatically.messages key with a list value.session_001.jsonl) for predictable ordering..jsonl files are ignored in directory mode.sequential. Use --dataset-sampling-strategy shuffle or random for varied ordering.