From zero to first call in two minutes.
Generate a Personal Access Token (PAT), make your first request, and confirm everything is wired up before plugging in your AI tool.
1. Generate a token
Sign in at app.storylayer.ai and visit Developers in the sidebar. Click Generate token, give it a name, pick a scope preset (or check individual scopes — see Scopes), and optionally bind the token to a single project.
The token is shown once. Storylayer stores only a SHA-256 hash; if you lose the raw token, revoke it and create a new one.
2. Health-check the token
curl https://app.storylayer.ai/api/v1/health \
-H "Authorization: Bearer sl_pat_..."You should get back something like:
{
"ok": true,
"user_id": "1d3a...",
"project_id": null,
"scopes": ["projects:read","stories:read","stories:write"],
"server_time": "2026-04-30T..."
}3. List your projects
curl https://app.storylayer.ai/api/v1/projects \
-H "Authorization: Bearer sl_pat_..."Account-scoped tokens see every project; project-scoped tokens return only their bound project. Use the project ID from this response in the next call.
4. Create a story
Single post:
curl -X POST https://app.storylayer.ai/api/v1/stories \
-H "Authorization: Bearer sl_pat_..." \
-H "content-type: application/json" \
-d '{
"projectId": "PROJECT_ID",
"caption": "Snow report: 14 inches overnight at Winter Park.",
"channels": ["instagram"],
"media_url": "https://cdn.example.com/cover.jpg",
"scheduled_at_local": "2026-05-01T07:00:00",
"timezone": "America/New_York"
}'Carousel (2–10 slides):
curl -X POST https://app.storylayer.ai/api/v1/stories \
-H "Authorization: Bearer sl_pat_..." \
-H "content-type: application/json" \
-d '{
"projectId": "PROJECT_ID",
"caption": "Winter Park'\''s deepest week — by the numbers.",
"channels": ["instagram"],
"post_type": "carousel",
"slides": [
{ "media_url": "https://cdn.example.com/s1.png", "alt_text": "14 inches overnight" },
{ "media_url": "https://cdn.example.com/s2.png", "alt_text": "+4 days of snow ahead" },
{ "media_url": "https://cdn.example.com/s3.png", "alt_text": "Lift status" }
],
"scheduled_at_local": "2026-05-01T19:00:00",
"timezone": "America/New_York"
}'Don't have hosted URLs? Upload bytes directly via POST /api/v1/media with data_base64 + mime_type and pass the returned file_url into create_story.
Use POST /api/v1/stories/:id/publish to ship now or POST /api/v1/stories/:id/schedule to move the time.
5. Plug it into your AI tool
Two paths, same auth:
- Local agents (Claude Desktop, MCP Inspector): paste the PAT into the client config — see MCP setup.
- Hosted agents (Claude.ai connectors, ChatGPT GPTs): point the client at the MCP URL and let it walk through OAuth — see OAuth 2.1. No token paste required.
Next steps
- REST API reference — every endpoint with shapes.
- MCP setup — Claude Desktop / Claude.ai / ChatGPT.
- Webhooks — get notified when a story ships.
- Rate limits — what to expect on 429.