Is error 500 caused by JSONL file ID formatting?

I tried to evaluate the images, but got an error 500 during client.evals.runs.create().

It might be the image issue. I uploaded it as a file and use file id: "file:file-123456789" in JSONL:
{"image_1":"file:file-123456789","expected_output":"CAT|DOG"}

Can it be the JSONL with the file ID issue or something else? Thanks for the hint.

Here is data_source, in case:

 data_source={
        "type": "responses",
        "model": "gpt-4.1",
        "input_messages": {
            "type": "template",
            "template": [
                {
                    "role": "user",
                    "content": [
                        {
                            "type": "input_text",
                            "text": (
                                "# Analysis Instructions\n"
                                "Return ONLY a single line in the exact format:\n"
                                "CAT|DOG\n"
                            ),
                        },
                        {"type": "input_image", "image_url": "{{ item.image_1 }}"},
                    ],
                }
            ],
        },
        "source": {"type": "file_id", "id": DatasetJSONLId )},
    },

After similar experience, most revert to alphanumeric + underscore at most as ID to avoid issues.

Could you give some details? Thanks

I gave gpt-5 a screenshot to figure out.

It looks like the person named “_j” is specifying a constraint for an ID format:

“alphanumeric + underscore at most as ID”

This means:

  • Allowed characters:

    • Letters (A–Z, a–z)
    • Digits (0–9)
    • Underscore (_)
  • Not allowed:

    • Spaces
    • Special characters like -, ., @, #, !, etc.
  • The phrase “at most” means the allowed set is limited to these characters — you can’t add others.

Example valid IDs:

  • user_01
  • ABC123
  • id_number_5

Example invalid IDs:

  • user-name (dash not allowed)
  • id#42 (hash not allowed)
  • abc def (space not allowed)

If you’d like, I can also give you a regex pattern that enforces this rule. It would be something like:

^[A-Za-z0-9_]+$

That ensures the string is only made of alphanumeric characters or underscores, and contains at least one character.

Do you want me to explain why such a restriction might be used? That often relates to database or API compatibility.

1 Like