curl https://api.caistrolabs.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Nous-20B",
"messages": [
{"role": "system", "content": "You are a marketing strategist."},
{"role": "user", "content": "How do I improve my ROAS on Meta?"}
],
"temperature": 0.7,
"max_tokens": 500
}'
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "Nous-20B",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "To improve your ROAS on Meta, focus on these key areas:\n\n1. **Audience Refinement**: Use Advantage+ audiences but exclude past purchasers from prospecting campaigns.\n\n2. **Creative Testing**: Run 3-5 ad variations per ad set with different hooks in the first 3 seconds.\n\n3. **Budget Allocation**: Allocate 70% to proven winners and 30% to testing.\n\n4. **Conversion Optimization**: Ensure your pixel is firing correctly and optimize for the deepest funnel event you have sufficient volume for."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 128,
"total_tokens": 170
}
}
Create a chat completion
curl https://api.caistrolabs.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Nous-20B",
"messages": [
{"role": "system", "content": "You are a marketing strategist."},
{"role": "user", "content": "How do I improve my ROAS on Meta?"}
],
"temperature": 0.7,
"max_tokens": 500
}'
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "Nous-20B",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "To improve your ROAS on Meta, focus on these key areas:\n\n1. **Audience Refinement**: Use Advantage+ audiences but exclude past purchasers from prospecting campaigns.\n\n2. **Creative Testing**: Run 3-5 ad variations per ad set with different hooks in the first 3 seconds.\n\n3. **Budget Allocation**: Allocate 70% to proven winners and 30% to testing.\n\n4. **Conversion Optimization**: Ensure your pixel is firing correctly and optimize for the deepest funnel event you have sufficient volume for."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 128,
"total_tokens": 170
}
}
chat.completioncurl https://api.caistrolabs.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Nous-20B",
"messages": [
{"role": "system", "content": "You are a marketing strategist."},
{"role": "user", "content": "How do I improve my ROAS on Meta?"}
],
"temperature": 0.7,
"max_tokens": 500
}'
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "Nous-20B",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "To improve your ROAS on Meta, focus on these key areas:\n\n1. **Audience Refinement**: Use Advantage+ audiences but exclude past purchasers from prospecting campaigns.\n\n2. **Creative Testing**: Run 3-5 ad variations per ad set with different hooks in the first 3 seconds.\n\n3. **Budget Allocation**: Allocate 70% to proven winners and 30% to testing.\n\n4. **Conversion Optimization**: Ensure your pixel is firing correctly and optimize for the deepest funnel event you have sufficient volume for."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 128,
"total_tokens": 170
}
}