Skip to content

Conversation

@flexchar
Copy link

@flexchar flexchar commented Jun 9, 2025

Model: https://fal.ai/models/fal-ai/sam2/image

I attempted to call API and got this validation error:

{
    "detail": [
        {
            "loc": [
                "body",
                "prompts",
                0,
                "label"
            ],
            "msg": "unexpected value; permitted: 0, 1",
            "type": "value_error.const",
            "ctx": {
                "given": "1",
                "permitted": [
                    0,
                    1
                ]
            }
        },
        {
            "loc": [
                "body",
                "prompts",
                1,
                "label"
            ],
            "msg": "unexpected value; permitted: 0, 1",
            "type": "value_error.const",
            "ctx": {
                "given": "1",
                "permitted": [
                    0,
                    1
                ]
            }
        },
        {
            "loc": [
                "body",
                "prompts",
                2,
                "label"
            ],
            "msg": "unexpected value; permitted: 0, 1",
            "type": "value_error.const",
            "ctx": {
                "given": "1",
                "permitted": [
                    0,
                    1
                ]
            }
        }
    ]
}

Seems that the types are misleading. An integer is expected.

I attempted to call API and got this validation error:

```
{
    "detail": [
        {
            "loc": [
                "body",
                "prompts",
                0,
                "label"
            ],
            "msg": "unexpected value; permitted: 0, 1",
            "type": "value_error.const",
            "ctx": {
                "given": "1",
                "permitted": [
                    0,
                    1
                ]
            }
        },
        {
            "loc": [
                "body",
                "prompts",
                1,
                "label"
            ],
            "msg": "unexpected value; permitted: 0, 1",
            "type": "value_error.const",
            "ctx": {
                "given": "1",
                "permitted": [
                    0,
                    1
                ]
            }
        },
        {
            "loc": [
                "body",
                "prompts",
                2,
                "label"
            ],
            "msg": "unexpected value; permitted: 0, 1",
            "type": "value_error.const",
            "ctx": {
                "given": "1",
                "permitted": [
                    0,
                    1
                ]
            }
        }
    ]
}
```

Seems that the types are misleading. An integer is expected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant