# Using OpenAI/Anthropic-style SDKs for Testing

> Learn to use official AI SDKs for rapid red teaming. Master client initialization, structured outputs, and know when to drop down to raw HTTP for advanced exploitation.

Canonical: https://codelivly.com/rooms/using-openaianthropic-style-sdks-for-testing
Last updated: 2026-10-02

| | |
|---|---|
| Level | Intermediate |
| Category | Cybersecurity |
| Lessons | 3 |
| Estimated time | 30 min |
| XP | 100 |

This module explores the practical use of official Software Development Kits (SDKs) from providers like OpenAI and Anthropic for AI security testing. You will learn how to initialize clients, manage API keys, leverage built-in retry mechanisms, and utilize advanced features like Structured Outputs. Crucially, you will also understand the limitations of SDKs—specifically how they abstract away raw HTTP mechanics—and learn when to bypass them to test for backend edge cases, parameter tampering, and malformed payload handling.

## Lessons

1. What is an SDK and Why Use One Over Raw Requests (30 min)
2. Setting Up an SDK for Testing (auth, config) (30 min)
3. Sending Prompts and Parsing Model Responses via SDK (30 min)

## Related

- [Learning path: Python for AI Security Testing](https://codelivly.com/learning-paths/python-for-ai-security-testing)
- [All rooms](https://codelivly.com/rooms)
