POST
/v1/extractExtraction API
Server-to-server content extraction. Pass any URL — web page, PDF, YouTube, or Bilibili — and get back clean markdown. No user account required on your end. Auth uses an sk_iopho_ API key, not OAuth.
Get an API key
- Sign in at console.iopho.com
- Go to API Keys → New key
- Name it, set an expiry (optional), click Generate
- Copy the key immediately — shown only once
Authentication
All requests require a Bearer token with your sk_iopho_ key:
curl -X POST https://fhgxapmrciwlhsffdeyj.supabase.co/functions/v1/reedle-api/v1/extract \
-H "Authorization: Bearer sk_iopho_your_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://arxiv.org/abs/2310.06825"}'Source type detection
| Source | Detection | Backend | Credits |
|---|---|---|---|
| Web page | Any HTTP/HTTPS URL | Jina AI reader | 1 |
.pdf extension or arxiv.org/pdf | Jina AI reader | 5 | |
| YouTube | youtube.com/watch or youtu.be/ | Transcript service | 3 |
| Bilibili | bilibili.com/video or BV prefix | Bilibili subtitle API | 3 |
Examples by source
curl -X POST $BASE/v1/extract \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"url": "https://news.ycombinator.com"}'Response schema
200 OK
{
"content": "# Mistral 7B\n\nWe introduce Mistral 7B...",
"format": "markdown",
"source_type": "web", // "web" | "pdf" | "youtube" | "bilibili"
"title": "Mistral 7B",
"credits_used": 1,
"source": "https://arxiv.org/abs/2310.06825"
}Error codes
Error
{
"error": "Insufficient credits",
"credits_needed": 5 // only present for 402 responses
}| Status | Cause |
|---|---|
| 400 | Missing or invalid url field |
| 401 | Invalid, revoked, or expired API key |
| 402 | Insufficient credits |
| 429 | Rate limit exceeded — 30 requests per 60 seconds |
| 503 | Upstream extraction service unavailable |
Key management endpoints
Manage keys programmatically using your Supabase session token (JWT):
| Method | Path | Description |
|---|---|---|
| GET | /v1/keys | List all your API keys (hashed, not plaintext) |
| POST | /v1/keys | Create a new key — returns plaintext once |
| DELETE | /v1/keys/:id | Revoke a key immediately |
| GET | /v1/usage | Paginated usage log |
Security model
- Keys are stored as SHA-256 hashes — the plaintext is never persisted after creation
- Credits deducted only on successful extraction (status 200)
- Usage logged fire-and-forget after response — never blocks latency
- Each key can be independently revoked without affecting others