> ## Documentation Index
> Fetch the complete documentation index at: https://dev.contentify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Topics

> This endpoint will generate a list of headlines

<ParamField body="topic" type="string">
  This is the topic for which you want to generate ideas.
</ParamField>

<ParamField body="guidelines" type="string">
  This is the guidelines.
</ParamField>

### Response

<ResponseField name="post_ideas" type="string">
  A json object containing the ideas for the topic.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST \
    <BASE_URL>/topics \
    -H 'Content-Type: application/json' \
    -H 'X-API-Key: YOUR_API_KEY' \
    -d '{
      "topic": "sustainable living",
      "guidelines": "This is the guidelines."
  }'

  ```

  ```bash PHP theme={null}
  $url = '<BASE_URL>/topics';
  $data = array(
      'topic' => 'sustainable living',
      'guidelines' => 'This is the guidelines.'
  );

  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(
      'Content-Type: application/json',
      'X-API-Key: YOUR_API_KEY'
  ));

  $response = curl_exec($ch);
  curl_close($ch);

  ```

  ```bash Python theme={null}
  import requests

  url = '<BASE_URL>/topics'
  headers = {
      'Content-Type': 'application/json',
      'X-API-Key': 'YOUR_API_KEY'
  }
  data = {
      'topic': 'sustainable living',
      'guidelines': 'This is the guidelines.'
  }

  response = requests.post(url, headers=headers, json=data)
  print(response.json())

  ```

  ```bash JavaScript theme={null}
  const url = '<BASE_URL>/topics';
  const headers = {
      'Content-Type': 'application/json',
      'X-API-Key': 'YOUR_API_KEY'
  };
  const data = {
      topic: 'sustainable living',
      guidelines: 'This is the guidelines.'
  };

  fetch(url, {
      method: 'POST',
      headers: headers,
      body: JSON.stringify(data)
  })
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "topic": [
  		"Future of AI",
  		"AI in Healthcare",
  		"AI in Education",
  		"AI in Finance",
  		"AI in Robotics",
  		"AI in Marketing"
      ]
  }
  ```
</ResponseExample>

 

#

 

#

 
