Interview
Generate Interview Questions
POST
/
ai
/
generate-questions
curl --request POST \
--url https://api.tidyhire.app/api/public/v1/ai/generate-questions \
--header 'x-tidyhire-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"job_title": "Senior Software Engineer",
"company_name": "Acme Corp",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"]
}'
fetch('https://api.tidyhire.app/api/public/v1/ai/generate-questions', {
method: 'POST',
headers: {
'x-tidyhire-api-key': '<token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
job_title: 'Senior Software Engineer',
company_name: 'Acme Corp',
job_description:
'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
}),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
<?php
$url = 'https://api.tidyhire.app/api/public/v1/ai/generate-questions';
$data = [
'job_title' => 'Senior Software Engineer',
'company_name' => 'Acme Corp',
'job_description' => 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
'min_experience' => 3,
'max_experience' => 5,
'seniority_level' => 'Senior',
'work_type' => 'Remote',
'employment_type' => 'Full Time',
'location' => 'New York, NY',
'skills_required' => ['JavaScript', 'Node.js', 'MongoDB']
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-tidyhire-api-key: <token>',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.tidyhire.app/api/public/v1/ai/generate-questions"
payload := map[string]interface{}{
"job_title": "Senior Software Engineer",
"company_name": "Acme Corp",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": []string{"JavaScript", "Node.js", "MongoDB"},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-tidyhire-api-key", "<token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class GenerateQuestions {
public static void main(String[] args) {
try {
URL url = new URL("https://api.tidyhire.app/api/public/v1/ai/generate-questions");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("x-tidyhire-api-key", "<token>");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"job_title\": \"Senior Software Engineer\",\n" +
" \"company_name\": \"Acme Corp\",\n" +
" \"job_description\": \"We are looking for a Senior Software Engineer to join our team and build scalable backend services.\",\n" +
" \"min_experience\": 3,\n" +
" \"max_experience\": 5,\n" +
" \"seniority_level\": \"Senior\",\n" +
" \"work_type\": \"Remote\",\n" +
" \"employment_type\": \"Full Time\",\n" +
" \"location\": \"New York, NY\",\n" +
" \"skills_required\": [\"JavaScript\", \"Node.js\", \"MongoDB\"]\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.tidyhire.app/api/public/v1/ai/generate-questions')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['x-tidyhire-api-key'] = '<token>'
request['Content-Type'] = 'application/json'
request.body = {
job_title: 'Senior Software Engineer',
company_name: 'Acme Corp',
job_description: 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB']
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": [
{
"id": "a1b2c3d4e5f60123456789abcdef0123",
"question": "Tell me about a production application you led. What architecture choices did you make?",
"type": "verbal"
}
]
}
This endpoint is AI-powered and rate limited to 5 requests/minute. It uses a large language model to generate tailored interview questions based on the job details, skills, and requirements provided.
curl --request POST \
--url https://api.tidyhire.app/api/public/v1/ai/generate-questions \
--header 'x-tidyhire-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"job_title": "Senior Software Engineer",
"company_name": "Acme Corp",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"]
}'
fetch('https://api.tidyhire.app/api/public/v1/ai/generate-questions', {
method: 'POST',
headers: {
'x-tidyhire-api-key': '<token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
job_title: 'Senior Software Engineer',
company_name: 'Acme Corp',
job_description:
'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
}),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
<?php
$url = 'https://api.tidyhire.app/api/public/v1/ai/generate-questions';
$data = [
'job_title' => 'Senior Software Engineer',
'company_name' => 'Acme Corp',
'job_description' => 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
'min_experience' => 3,
'max_experience' => 5,
'seniority_level' => 'Senior',
'work_type' => 'Remote',
'employment_type' => 'Full Time',
'location' => 'New York, NY',
'skills_required' => ['JavaScript', 'Node.js', 'MongoDB']
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-tidyhire-api-key: <token>',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.tidyhire.app/api/public/v1/ai/generate-questions"
payload := map[string]interface{}{
"job_title": "Senior Software Engineer",
"company_name": "Acme Corp",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": []string{"JavaScript", "Node.js", "MongoDB"},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-tidyhire-api-key", "<token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class GenerateQuestions {
public static void main(String[] args) {
try {
URL url = new URL("https://api.tidyhire.app/api/public/v1/ai/generate-questions");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("x-tidyhire-api-key", "<token>");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"job_title\": \"Senior Software Engineer\",\n" +
" \"company_name\": \"Acme Corp\",\n" +
" \"job_description\": \"We are looking for a Senior Software Engineer to join our team and build scalable backend services.\",\n" +
" \"min_experience\": 3,\n" +
" \"max_experience\": 5,\n" +
" \"seniority_level\": \"Senior\",\n" +
" \"work_type\": \"Remote\",\n" +
" \"employment_type\": \"Full Time\",\n" +
" \"location\": \"New York, NY\",\n" +
" \"skills_required\": [\"JavaScript\", \"Node.js\", \"MongoDB\"]\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.tidyhire.app/api/public/v1/ai/generate-questions')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['x-tidyhire-api-key'] = '<token>'
request['Content-Type'] = 'application/json'
request.body = {
job_title: 'Senior Software Engineer',
company_name: 'Acme Corp',
job_description: 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB']
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": [
{
"id": "a1b2c3d4e5f60123456789abcdef0123",
"question": "Tell me about a production application you led. What architecture choices did you make?",
"type": "verbal"
}
]
}
Authorizations
string | header
required
API key of the form
<token>, passed as the x-tidyhire-api-key header.Body
string
required
Job title.Example:
"Senior Software Engineer"string
required
Company name.Example:
"Acme Corp"string
required
Detailed job description.Example:
"We are looking for a Senior Software Engineer to join our team..."number
required
Minimum years of experience required.Example:
3number
required
Maximum years of experience required.Example:
5string
required
One of:
Entry, Mid, Senior, Lead, Principal, Staff.Example: "Senior"string
required
One of:
Remote, On Site, Hybrid.Example: "Remote"string
required
One of:
Full Time, Part Time, Contract, Freelance.Example: "Full Time"string
Job location.Example:
"New York, NY"string[]
required
Required skills. Minimum 3.Example:
["JavaScript", "Node.js", "MongoDB"]string[]
Preferred skills.Example:
["TypeScript", "Redis", "Docker"]string
One of:
15 Minutes, 30 Minutes, 45 Minutes, 1 hour, 2 hours. Defaults to "30 Minutes".Response
Interview questions generated successfullyboolean
Indicates if the request was successful. Example:
trueobject[]
Common Errors
- 400 Bad Request
- 401 Unauthorized
- 422 Validation Error
- 429 Too Many Requests
Reason: The request body is not valid JSON.
{
"success": false,
"message": "Invalid JSON in request body"
}
Reason: Missing or invalid
x-tidyhire-api-key header.{
"success": false,
"message": "Unauthorized, Please reach out at support@tidyhire.app"
}
Reason: Missing or invalid fields — each entry in
errors points to a specific field.{
"success": false,
"message": "Validation error: 4 fields failed validation. See \"errors\" for details.",
"errors": [
{ "path": "seniority_level", "message": "Seniority level must be one of: Entry, Mid, Senior, Lead, Principal or Staff" },
{ "path": "skills_required", "message": "Skills Required is required" }
]
}
{
"success": false,
"message": "Validation error: At least 3 required skills are required",
"errors": [
{ "path": "skills_required", "message": "At least 3 required skills are required" }
]
}
Reason: More than 5 requests in a minute.
{
"success": false,
"message": "Too many requests, please try again later"
}
Was this page helpful?
⌘I
curl --request POST \
--url https://api.tidyhire.app/api/public/v1/ai/generate-questions \
--header 'x-tidyhire-api-key: <token>' \
--header 'Content-Type: application/json' \
--data '{
"job_title": "Senior Software Engineer",
"company_name": "Acme Corp",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": ["JavaScript", "Node.js", "MongoDB"]
}'
fetch('https://api.tidyhire.app/api/public/v1/ai/generate-questions', {
method: 'POST',
headers: {
'x-tidyhire-api-key': '<token>',
'Content-Type': 'application/json',
},
body: JSON.stringify({
job_title: 'Senior Software Engineer',
company_name: 'Acme Corp',
job_description:
'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB'],
}),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error('Error:', error));
<?php
$url = 'https://api.tidyhire.app/api/public/v1/ai/generate-questions';
$data = [
'job_title' => 'Senior Software Engineer',
'company_name' => 'Acme Corp',
'job_description' => 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
'min_experience' => 3,
'max_experience' => 5,
'seniority_level' => 'Senior',
'work_type' => 'Remote',
'employment_type' => 'Full Time',
'location' => 'New York, NY',
'skills_required' => ['JavaScript', 'Node.js', 'MongoDB']
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-tidyhire-api-key: <token>',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
url := "https://api.tidyhire.app/api/public/v1/ai/generate-questions"
payload := map[string]interface{}{
"job_title": "Senior Software Engineer",
"company_name": "Acme Corp",
"job_description": "We are looking for a Senior Software Engineer to join our team and build scalable backend services.",
"min_experience": 3,
"max_experience": 5,
"seniority_level": "Senior",
"work_type": "Remote",
"employment_type": "Full Time",
"location": "New York, NY",
"skills_required": []string{"JavaScript", "Node.js", "MongoDB"},
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("x-tidyhire-api-key", "<token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class GenerateQuestions {
public static void main(String[] args) {
try {
URL url = new URL("https://api.tidyhire.app/api/public/v1/ai/generate-questions");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("x-tidyhire-api-key", "<token>");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
String jsonInputString = "{\n" +
" \"job_title\": \"Senior Software Engineer\",\n" +
" \"company_name\": \"Acme Corp\",\n" +
" \"job_description\": \"We are looking for a Senior Software Engineer to join our team and build scalable backend services.\",\n" +
" \"min_experience\": 3,\n" +
" \"max_experience\": 5,\n" +
" \"seniority_level\": \"Senior\",\n" +
" \"work_type\": \"Remote\",\n" +
" \"employment_type\": \"Full Time\",\n" +
" \"location\": \"New York, NY\",\n" +
" \"skills_required\": [\"JavaScript\", \"Node.js\", \"MongoDB\"]\n" +
"}";
try (OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
int status = con.getResponseCode();
System.out.println("Response Status: " + status);
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://api.tidyhire.app/api/public/v1/ai/generate-questions')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path)
request['x-tidyhire-api-key'] = '<token>'
request['Content-Type'] = 'application/json'
request.body = {
job_title: 'Senior Software Engineer',
company_name: 'Acme Corp',
job_description: 'We are looking for a Senior Software Engineer to join our team and build scalable backend services.',
min_experience: 3,
max_experience: 5,
seniority_level: 'Senior',
work_type: 'Remote',
employment_type: 'Full Time',
location: 'New York, NY',
skills_required: ['JavaScript', 'Node.js', 'MongoDB']
}.to_json
response = http.request(request)
puts response.body
{
"success": true,
"data": [
{
"id": "a1b2c3d4e5f60123456789abcdef0123",
"question": "Tell me about a production application you led. What architecture choices did you make?",
"type": "verbal"
}
]
}