POST /jobs/create

Create a new job description entry with AI-generated summaries for use with search and assessment endpoints. This endpoint processes your job description and generates multiple summary versions optimized for different use cases. The job is stored with a unique ID for use with other job management endpoints.

🔑 Credits

  • Cost: FREE - No credits charged for job creation

Authentication

API key can be provided in two ways:
  • Header: x-api-key: YOUR_API_KEY
  • Query parameter: api_key=YOUR_API_KEY

Request Body (JSON)

NameTypeRequiredDescription
api_keystring✅ YesAPI key for authentication (can also be in x-api-key header)
descriptionstring✅ YesJob description text (30-10,000 characters)

Response Headers

HeaderDescription
X-Credits-UsedTotal credits used by your API key across all endpoints
X-Credits-Used-AssessCredits used specifically for assessment operations
X-Credits-RemainingRemaining credits (-1 for unlimited accounts)

Response

Returns a job ID that can be used with search and assessment endpoints.
{
  "id": "550e8400-e29b-41d4-a716-446655440000"
}

Examples

Using cURL
curl -X POST "https://api.b2d.ai/jobs/create" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Senior Python Developer\n\nWe are looking for an experienced Python developer to join our data engineering team.\n\nRequirements:\n- 5+ years Python development experience\n- Experience with Flask, Django, or FastAPI\n- Knowledge of SQL databases\n- AWS cloud experience preferred"
  }'
Using Python
import requests

headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}

data = {
    "description": """Senior Python Developer

We are looking for an experienced Python developer to join our data engineering team.

Requirements:
- 5+ years Python development experience
- Experience with Flask, Django, or FastAPI
- Knowledge of SQL databases
- AWS cloud experience preferred

Responsibilities:
- Build and maintain REST APIs
- Design data processing workflows
- Work with large datasets
- Collaborate with data science team"""
}

response = requests.post("https://api.b2d.ai/jobs/create", 
                        headers=headers, json=data)

if response.status_code == 200:
    job_data = response.json()
    job_id = job_data['id']
    print(f"Job created successfully: {job_id}")
    
    # Check usage headers
    print(f"Credits used: {response.headers.get('X-Credits-Used')}")
    print(f"Credits remaining: {response.headers.get('X-Credits-Remaining')}")
else:
    print(f"Error: {response.status_code} - {response.json()}")
Raw HTTP Request
POST https://api.b2d.ai/jobs/create
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "description": "Senior Python Developer\n\nWe are looking for an experienced Python developer to join our data engineering team.\n\nRequirements:\n- 5+ years Python development experience\n- Experience with Flask, Django, or FastAPI\n- Knowledge of SQL databases\n- AWS cloud experience preferred"
}

Error Responses

Status CodeDescription
400Bad Request - Invalid or missing description
401Unauthorized - Missing API key
403Forbidden - Invalid API key
500Internal Server Error
Example Error Response:
{
  "error": "description must be at least 30 characters"
}

Next Steps

After creating a job, use the returned job ID with: