get_model_schema
GenerationGet Model Schema
Get the input parameter schema for any Scenario model. Call this before run_model to discover accepted fields, types, defaults, and constraints. Args: - model_id: required — model to inspect - team_id, project_id: required for OAuth callers - response_format: 'json' (default) or 'markdown' Returns: model metadata plus a parameters array with field names, types, descriptions, required flags, defaults, and allowed values when available. Examples: - "What parameters does this model accept?" -> model_id="model_google-gemini-3-1-flash" - "Inspect this model before generating" -> call get_model_schema, then build run_model parameters from the response Don't use when: You need to discover models by task or name. Prefer search or recommend instead.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model_id | string | ✓ | Model ID to get the schema for (e.g. 'model_google-gemini-3-1-flash'). |
| team_id | string | — | Team ID. Required if user belongs to multiple teams. |
| project_id | string | — | Project ID to scope the operation to. |
| response_format | enum(json | markdown) | json | Output format: 'json' for structured data, 'markdown' for human-readable text. |
Example Request
{
"model_id": "model_google-gemini-3-1-flash",
"team_id": "team_abc123",
"project_id": "proj_xyz789"
}Example Response
{
"model_id": "model_staging_google-gemini-3-1-flash",
"name": "Gemini 3.1 Flash 🍌",
"capabilities": [
"txt2img",
"img2img"
],
"parameters": [
{
"name": "prompt",
"type": "string",
"description": "Text prompt for image generation/editing",
"required": true,
"max_length": 4096
},
{
"name": "referenceImages",
"type": "file_array",
"description": "Reference images for style or content guidance",
"required": false,
"max_length": 14,
"cost_impact": true
},
{
"name": "aspectRatio",
"type": "string",
"description": "Aspect ratio for the generated image",
"required": false,
"default": "auto",
"allowed_values": [
"21:9",
"16:9",
"3:2",
"4:3",
"5:4",
"1:1",
"4:5",
"3:4",
"2:3",
"9:16",
"auto"
]
},
{
"name": "resolution",
"type": "string",
"description": "Resolution for the generated image",
"required": false,
"default": "1K",
"allowed_values": [
"512",
"1K",
"2K",
"4K"
],
"cost_impact": true
},
{
"name": "useGoogleSearch",
"type": "boolean",
"description": "Use Google Search to find more information about the prompt",
"required": false,
"default": false,
"cost_impact": true
},
{
"name": "numOutputs",
"type": "number",
"description": "Number of images to generate",
"required": false,
"default": 1,
"min": 1,
"max": 4,
"cost_impact": true
},
{
"name": "seed",
"type": "number",
"description": "Use a seed for reproducible results. Leave blank to use a random seed.",
"required": false,
"min": 0,
"max": 2147483647
}
]
}Common Use Cases
- Discover all accepted parameters before calling run_model
- Check allowed aspect ratios and resolutions for a specific model
- Find required fields to avoid validation errors at generation time
- Understand cost-impacting parameters before running an expensive job