Skip to main content

Code Examples

Ready-to-use examples in cURL and Python.

Generate Cold Email

Create a personalized cold email for sales outreach.

Shell
curl -X POST "https://api.orchestraight.com/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "cold_email",
    "context": {
      "sender": {
        "company": "Acme AI",
        "value_proposition": "AI-powered sales automation that books 3x more meetings"
      },
      "prospect": {
        "role": "VP of Sales",
        "industry": "B2B SaaS",
        "pain_points": ["low response rates", "manual prospecting"]
      },
      "relationship": {
        "stage": "cold",
        "specific_trigger": "Recently raised Series B"
      },
      "objective": "Book a 15-minute discovery call"
    }
  }'

Generate Follow-Up Email

Create a follow-up email based on previous interactions.

Shell
curl -X POST "https://api.orchestraight.com/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "follow_up_email",
    "context": {
      "sender": {
        "company": "Acme AI",
        "value_proposition": "AI-powered sales automation"
      },
      "prospect": {
        "role": "VP of Sales",
        "industry": "B2B SaaS"
      },
      "relationship": {
        "stage": "warm",
        "previous_touchpoints": [
          "Initial cold email sent 3 days ago",
          "Prospect viewed pricing page twice"
        ]
      },
      "objective": "Re-engage and schedule a demo"
    }
  }'

Generate Landing Page

Create conversion-focused landing page copy.

Shell
curl -X POST "https://api.orchestraight.com/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "landing_page",
    "context": {
      "sender": {
        "company": "Acme AI",
        "value_proposition": "AI sales assistant that automates prospecting",
        "credibility_markers": ["500+ customers", "G2 Leader 2024"]
      },
      "prospect": {
        "role": "Sales Leaders",
        "industry": "B2B Technology",
        "pain_points": ["spending too much time on manual research"],
        "goals": ["increase pipeline", "reduce SDR burnout"]
      },
      "relationship": { "stage": "cold" },
      "objective": "Get visitors to start a free trial"
    }
  }'

Generate Objection Handler

Get responses to common sales objections.

Shell
curl -X POST "https://api.orchestraight.com/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "objection_handler",
    "context": {
      "sender": {
        "company": "Acme AI",
        "value_proposition": "AI-powered sales automation"
      },
      "prospect": {
        "company": "TechCorp",
        "objection": "Your product is too expensive compared to competitors"
      },
      "relationship": { "stage": "warm" },
      "objective": "Address pricing objection and demonstrate value"
    }
  }'

Generate Sales Script (Coming Soon)

Create a complete sales call script. Script content types will be available in an upcoming release.

Shell
curl -X POST "https://api.orchestraight.com/v1/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "sales_script",
    "context": {
      "sender": {
        "company": "Acme AI",
        "role": "Account Executive",
        "value_proposition": "AI that automates 80% of prospecting work"
      },
      "prospect": {
        "role": "CTO",
        "industry": "Enterprise Software",
        "pain_points": ["scaling sales team is expensive"]
      },
      "relationship": { "stage": "warm" },
      "objective": "Qualify the prospect and schedule a technical demo"
    }
  }'

Get AI Coaching

Get prompts and guidance to use with your own AI.

Shell
curl -X POST "https://api.orchestraight.com/v1/coach" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "cold_email",
    "context": {
      "sender": {
        "company": "Acme AI",
        "value_proposition": "AI-powered sales automation"
      },
      "prospect": {
        "role": "VP of Sales",
        "industry": "B2B SaaS"
      },
      "relationship": { "stage": "cold" },
      "objective": "Book a discovery call"
    }
  }'

Additional Resources

Need more examples?

The API supports 35 content types across 7 categories. See the Concepts page for the full list, or explore the API Reference for complete request and response schemas.