Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.semji.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through the four steps to go from zero to an AI-optimized content draft using the Semji API.
You need a Semji account to follow this guide. Sign up or log in at app.semji.com.

1. Create your API key

1

Open API key settings

Log in to app.semji.com, then go to Settings > Organization > API Keys.
2

Generate a key

Click New API key, give it a name (e.g. quickstart), and click Create.
3

Copy the key

Your key is shown once. Copy it now — you won’t be able to see it again. All keys start with sk_.
Treat your API key like a password. Don’t commit it to source control or include it in client-side code.
Export it in your terminal to use it in the commands below:
export SEMJI_API_KEY="sk_your_api_key_here"
Python examples read exported values with os.environ[...]. JavaScript examples read them with process.env.

2. Test your key

Call GET /v1/me to verify your key works and see your organization:
curl https://api.semji.com/v1/me \
  -H "Authorization: Bearer $SEMJI_API_KEY"
You should get back your user profile and organization:
{
  "id": "df286a001943",
  "firstName": "Jane",
  "lastName": "Smith",
  "email": "jane@example.com",
  "createdAt": "2024-03-15T10:30:00+00:00",
  "jobTitle": "Marketing Manager",
  "languageCode": "en",
  "profileImageUrl": null,
  "organization": {
    "id": "89b0f07aade2",
    "name": "Example Corp",
    "createdAt": "2024-01-10T08:00:00+00:00",
    "brandName": null,
    "brandImageUrl": null,
    "credits": {
      "analysis": 47,
      "aiWriting": 12,
      "contentIdeasSearches": 5
    },
    "usersCount": 3,
    "workspacesCount": 2
  }
}

3. Get your workspace

A workspace represents one website in Semji. List your workspaces to grab the id you’ll use in the next steps:
curl https://api.semji.com/v1/workspaces \
  -H "Authorization: Bearer $SEMJI_API_KEY"
Save your workspace ID:
export WORKSPACE_ID="6c629e33a9a6"

4. Import a page and optimize it

Import the page

Import a URL into your workspace. You can optionally attach a focus keyword right away:
curl -X POST "https://api.semji.com/v1/workspaces/$WORKSPACE_ID/pages" \
  -H "Authorization: Bearer $SEMJI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/blog/my-article",
    "focusKeyword": "content marketing strategy"
  }'
The response returns the page with its id and crawled metadata (title, word count, etc.). Save the page ID for the next step:
export PAGE_ID="1b81be0eb082"

Create a content draft

Create a content linked to the page you just imported:
curl -X POST "https://api.semji.com/v1/workspaces/$WORKSPACE_ID/contents" \
  -H "Authorization: Bearer $SEMJI_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"title\": \"Content Marketing Strategy for 2025\",
    \"pageId\": \"$PAGE_ID\"
  }"
Save the content ID:
export CONTENT_ID="3a89fc29d1f3"

Analyze the focus keyword

Before generating content, the focus keyword needs a completed SEO analysis. Trigger it with POST /v1/keywords/:id/analyze using the keyword ID returned during page import:
export KEYWORD_ID="b211968d8d46"
curl -X POST "https://api.semji.com/v1/keywords/$KEYWORD_ID/analyze" \
  -H "Authorization: Bearer $SEMJI_API_KEY"
Poll GET /v1/keywords/:id until analysisStatus reaches success:
curl "https://api.semji.com/v1/keywords/$KEYWORD_ID" \
  -H "Authorization: Bearer $SEMJI_API_KEY"
The analysis typically completes within 30 to 90 seconds.

Launch Atomic Content

Trigger an AI content generation on the draft. Use replace to generate from scratch or optimize to rewrite existing content:
curl -X POST "https://api.semji.com/v1/contents/$CONTENT_ID/atomic" \
  -H "Authorization: Bearer $SEMJI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "type": "replace" }'

Poll for completion

The generation runs asynchronously. Poll GET /v1/contents/:id/generation until the status reaches review:
curl "https://api.semji.com/v1/contents/$CONTENT_ID/generation" \
  -H "Authorization: Bearer $SEMJI_API_KEY"
Possible statuses: queuedpendingreviewsuccess (after confirm) or failed / cancelled.

Confirm the draft

Once the status is review, confirm the generation to apply it to your content:
curl -X POST "https://api.semji.com/v1/contents/$CONTENT_ID/generation/confirm" \
  -H "Authorization: Bearer $SEMJI_API_KEY"
Your content is now optimized. Open it in the Semji editor to review and publish.

What’s next?

API Reference

Explore all available endpoints.

Authentication

Rate limits, error handling, and key management.