SOP 005: Custom Parameters
Fresh 🌱Document ID: SOP-005
Version: 1.0
Status: Active
Objective
Pass custom parameters to Poe bots, including thinking budget, reasoning effort, and aspect ratios.
Prerequisites
- [x] API key obtained (SOP 001)
- [x] fastapi-poe installed (SOP 002)
- Understanding of basic queries (SOP 003)
Important Note
Parameter Format
Parameters must be passed via the parameters attribute in ProtocolMessage, NOT appended to the message content string. Appending "--thinking_budget 1000" to content will NOT work.
Procedure
Step 1: Create Message with Parameters
Use the parameters dictionary:
message = fp.ProtocolMessage(
role="user",
content="Your question here",
parameters={"parameter_name": "value"}
)Step 2: Query Bot
for partial in fp.get_bot_response_sync(
messages=[message],
bot_name="Bot-Name",
api_key=api_key
):
print(partial, end="", flush=True)Parameter Examples
Claude Models - Thinking Budget
Controls how much "thinking" the model does before responding:
import fastapi_poe as fp
import os
api_key = os.getenv("POE_API_KEY")
message = fp.ProtocolMessage(
role="user",
content="Explain quantum computing in detail",
parameters={"thinking_budget": 12288} # Higher = more thinking
)
for partial in fp.get_bot_response_sync(
messages=[message],
bot_name="Claude-Sonnet-4.5",
api_key=api_key
):
print(partial, end="", flush=True)Thinking Budget Values:
- Lower values (e.g., 1000): Faster responses, less deep thinking
- Higher values (e.g., 12288): Slower responses, more thorough analysis
GPT Models - Reasoning Effort
Controls reasoning intensity for GPT models:
message = fp.ProtocolMessage(
role="user",
content="Solve this complex math problem step by step",
parameters={"reasoning_effort": "high"} # Options: "low", "medium", "high"
)
for partial in fp.get_bot_response_sync(
messages=[message],
bot_name="GPT-5",
api_key=api_key
):
print(partial, end="", flush=True)Reasoning Effort Options:
"low": Faster, less intensive reasoning"medium": Balanced"high": Slower, more thorough reasoning
Image Generation - Aspect Ratio
For image generation bots like Imagen-4:
message = fp.ProtocolMessage(
role="user",
content="A cat wearing a hat",
parameters={"aspect_ratio": "4:3"} # Options: "1:1", "4:3", "16:9", "9:16", etc.
)
for partial in fp.get_bot_response_sync(
messages=[message],
bot_name="Imagen-4",
api_key=api_key
):
print(partial, end="", flush=True)Common Aspect Ratios:
"1:1": Square"4:3": Traditional"16:9": Widescreen"9:16": Portrait/vertical
Complete Examples
Claude with Thinking Budget
import fastapi_poe as fp
import os
api_key = os.getenv("POE_API_KEY")
message = fp.ProtocolMessage(
role="user",
content="Analyze the pros and cons of renewable energy",
parameters={"thinking_budget": 8192}
)
print("Querying Claude with high thinking budget...")
for partial in fp.get_bot_response_sync(
messages=[message],
bot_name="Claude-Sonnet-4.5",
api_key=api_key
):
print(partial, end="", flush=True)GPT with Reasoning Effort
import fastapi_poe as fp
import os
api_key = os.getenv("POE_API_KEY")
message = fp.ProtocolMessage(
role="user",
content="Prove the Pythagorean theorem",
parameters={"reasoning_effort": "high"}
)
print("Querying GPT-5 with high reasoning effort...")
for partial in fp.get_bot_response_sync(
messages=[message],
bot_name="GPT-5",
api_key=api_key
):
print(partial, end="", flush=True)Multiple Parameters
Some bots may support multiple parameters:
message = fp.ProtocolMessage(
role="user",
content="Generate an image",
parameters={
"aspect_ratio": "16:9",
"quality": "high" # If supported by bot
}
)Verification
Check that parameters are being applied:
- Thinking budget: Response should be more detailed with higher values
- Reasoning effort: Response should show more step-by-step reasoning
- Aspect ratio: Generated images should match specified ratio
Troubleshooting
Problem: Parameters seem ignored
Solution:
- Verify you're using
parametersdict, not content string - Check bot supports the parameter
- Verify parameter name spelling
Problem: Invalid parameter error
Solution:
- Check parameter name is correct
- Verify parameter value format
- Consult bot-specific documentation
Problem: No difference with parameters
Solution:
- Some bots may not support all parameters
- Try different parameter values
- Test with a bot that definitely supports the parameter
Parameter Reference
| Parameter | Bot Type | Values | Description |
|---|---|---|---|
thinking_budget | Claude | Integer (e.g., 12288) | Amount of thinking before response |
reasoning_effort | GPT | "low", "medium", "high" | Reasoning intensity level |
aspect_ratio | Image bots | "1:1", "4:3", "16:9", etc. | Image dimensions ratio |
Best Practices
- Use appropriate values - Higher thinking budget = more points consumed
- Test parameters - Verify they work with your chosen bot
- Document parameters - Keep track of what works for your use case
- Monitor costs - Parameters may affect point consumption
See Also
Next: Workflows Overview