Create an Infographic from a Topic Prompt
# pip install requests
import os
import requests
def main() -> None:
token = os.environ.get("AUTOCONTENT_TOKEN", "YOUR_API_TOKEN")
endpoint = "https://api.autocontentapi.com/content/Create"
payload = {
"outputType": "infographic",
"topic": "How electric vehicle charging networks are expanding in cities",
"text": "Keep it friendly for city planners and show two key stats plus one map-style callout.",
"infographicOrientation": "portrait",
"infographicDetail": "standard",
}
response = requests.post(
endpoint,
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
},
json=payload,
timeout=30,
)
response.raise_for_status()
print("Infographic request accepted:", response.json())
if __name__ == "__main__":
main()Last updated