Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "3.86.0",
"cliVersion": "4.0.1",
"generatorName": "fernapi/fern-python-sdk",
"generatorVersion": "4.59.4",
"generatorConfig": {
Expand Down
4 changes: 2 additions & 2 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2358,7 +2358,7 @@ You can provide either:
- `url` — a single URL string for one document
- `urls` — an array of URL strings for multiple documents

Supported file types include PDF, TXT, DOCX, CSV, XLSX, and more. Documents are downloaded and processed through the same pipeline as cloud storage indexing.
Supported file types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Documents are downloaded and processed through the same pipeline as cloud storage indexing.

Returns a job_id for tracking progress via GET /v2/jobs/{job_id}.
</dd>
Expand Down Expand Up @@ -2421,7 +2421,7 @@ client.indexing.index_url_v2(
<dl>
<dd>

**url:** `typing.Optional[str]` — A single public URL to a hosted document (PDF, TXT, DOCX, etc.). Provide either 'url' or 'urls', not both.
**url:** `typing.Optional[str]` — A single public URL to a hosted document. Supported types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Provide either 'url' or 'urls', not both.

</dd>
</dl>
Expand Down
16 changes: 4 additions & 12 deletions src/runcaptain/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Captain:



organization_id : typing.Optional[str]
organization_id : str
key : typing.Optional[typing.Union[str, typing.Callable[[], str]]]
headers : typing.Optional[typing.Dict[str, str]]
Additional headers to send with every request.
Expand Down Expand Up @@ -69,7 +69,7 @@ def __init__(
*,
base_url: typing.Optional[str] = None,
environment: CaptainEnvironment = CaptainEnvironment.DEFAULT,
organization_id: typing.Optional[str] = os.getenv("CAPTAIN_ORGANIZATION_ID"),
organization_id: str,
key: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CAPTAIN_API_KEY"),
headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
Expand All @@ -80,10 +80,6 @@ def __init__(
_defaulted_timeout = (
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
)
if organization_id is None:
raise ApiError(
body="The client must be instantiated be either passing in organization_id or setting CAPTAIN_ORGANIZATION_ID"
)
if key is None:
raise ApiError(body="The client must be instantiated be either passing in key or setting CAPTAIN_API_KEY")
self._client_wrapper = SyncClientWrapper(
Expand Down Expand Up @@ -164,7 +160,7 @@ class AsyncCaptain:



organization_id : typing.Optional[str]
organization_id : str
key : typing.Optional[typing.Union[str, typing.Callable[[], str]]]
headers : typing.Optional[typing.Dict[str, str]]
Additional headers to send with every request.
Expand Down Expand Up @@ -196,7 +192,7 @@ def __init__(
*,
base_url: typing.Optional[str] = None,
environment: CaptainEnvironment = CaptainEnvironment.DEFAULT,
organization_id: typing.Optional[str] = os.getenv("CAPTAIN_ORGANIZATION_ID"),
organization_id: str,
key: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = os.getenv("CAPTAIN_API_KEY"),
headers: typing.Optional[typing.Dict[str, str]] = None,
timeout: typing.Optional[float] = None,
Expand All @@ -207,10 +203,6 @@ def __init__(
_defaulted_timeout = (
timeout if timeout is not None else 60 if httpx_client is None else httpx_client.timeout.read
)
if organization_id is None:
raise ApiError(
body="The client must be instantiated be either passing in organization_id or setting CAPTAIN_ORGANIZATION_ID"
)
if key is None:
raise ApiError(body="The client must be instantiated be either passing in key or setting CAPTAIN_API_KEY")
self._client_wrapper = AsyncClientWrapper(
Expand Down
8 changes: 4 additions & 4 deletions src/runcaptain/indexing/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ def index_url_v2(
- `url` — a single URL string for one document
- `urls` — an array of URL strings for multiple documents

Supported file types include PDF, TXT, DOCX, CSV, XLSX, and more. Documents are downloaded and processed through the same pipeline as cloud storage indexing.
Supported file types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Documents are downloaded and processed through the same pipeline as cloud storage indexing.

Returns a job_id for tracking progress via GET /v2/jobs/{job_id}.

Expand All @@ -1049,7 +1049,7 @@ def index_url_v2(
Document processing type. 'advanced' uses agentic OCR with AI-enhanced extraction for complex layouts, tables, figures, charts, and documents containing images. 'basic' provides reliable OCR optimized for general document indexing and high-volume processing.

url : typing.Optional[str]
A single public URL to a hosted document (PDF, TXT, DOCX, etc.). Provide either 'url' or 'urls', not both.
A single public URL to a hosted document. Supported types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Provide either 'url' or 'urls', not both.

urls : typing.Optional[typing.Sequence[str]]
An array of public URLs to hosted documents. Provide either 'url' or 'urls', not both.
Expand Down Expand Up @@ -2196,7 +2196,7 @@ async def index_url_v2(
- `url` — a single URL string for one document
- `urls` — an array of URL strings for multiple documents

Supported file types include PDF, TXT, DOCX, CSV, XLSX, and more. Documents are downloaded and processed through the same pipeline as cloud storage indexing.
Supported file types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Documents are downloaded and processed through the same pipeline as cloud storage indexing.

Returns a job_id for tracking progress via GET /v2/jobs/{job_id}.

Expand All @@ -2208,7 +2208,7 @@ async def index_url_v2(
Document processing type. 'advanced' uses agentic OCR with AI-enhanced extraction for complex layouts, tables, figures, charts, and documents containing images. 'basic' provides reliable OCR optimized for general document indexing and high-volume processing.

url : typing.Optional[str]
A single public URL to a hosted document (PDF, TXT, DOCX, etc.). Provide either 'url' or 'urls', not both.
A single public URL to a hosted document. Supported types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Provide either 'url' or 'urls', not both.

urls : typing.Optional[typing.Sequence[str]]
An array of public URLs to hosted documents. Provide either 'url' or 'urls', not both.
Expand Down
8 changes: 4 additions & 4 deletions src/runcaptain/indexing/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def index_url_v2(
- `url` — a single URL string for one document
- `urls` — an array of URL strings for multiple documents

Supported file types include PDF, TXT, DOCX, CSV, XLSX, and more. Documents are downloaded and processed through the same pipeline as cloud storage indexing.
Supported file types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Documents are downloaded and processed through the same pipeline as cloud storage indexing.

Returns a job_id for tracking progress via GET /v2/jobs/{job_id}.

Expand All @@ -1078,7 +1078,7 @@ def index_url_v2(
Document processing type. 'advanced' uses agentic OCR with AI-enhanced extraction for complex layouts, tables, figures, charts, and documents containing images. 'basic' provides reliable OCR optimized for general document indexing and high-volume processing.

url : typing.Optional[str]
A single public URL to a hosted document (PDF, TXT, DOCX, etc.). Provide either 'url' or 'urls', not both.
A single public URL to a hosted document. Supported types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Provide either 'url' or 'urls', not both.

urls : typing.Optional[typing.Sequence[str]]
An array of public URLs to hosted documents. Provide either 'url' or 'urls', not both.
Expand Down Expand Up @@ -2160,7 +2160,7 @@ async def index_url_v2(
- `url` — a single URL string for one document
- `urls` — an array of URL strings for multiple documents

Supported file types include PDF, TXT, DOCX, CSV, XLSX, and more. Documents are downloaded and processed through the same pipeline as cloud storage indexing.
Supported file types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Documents are downloaded and processed through the same pipeline as cloud storage indexing.

Returns a job_id for tracking progress via GET /v2/jobs/{job_id}.

Expand All @@ -2172,7 +2172,7 @@ async def index_url_v2(
Document processing type. 'advanced' uses agentic OCR with AI-enhanced extraction for complex layouts, tables, figures, charts, and documents containing images. 'basic' provides reliable OCR optimized for general document indexing and high-volume processing.

url : typing.Optional[str]
A single public URL to a hosted document (PDF, TXT, DOCX, etc.). Provide either 'url' or 'urls', not both.
A single public URL to a hosted document. Supported types: PDF, DOCX, DOC, XLSX, XLS, CSV, TSV, TXT, MD, JSON, YAML, YML, PNG, JPG, JPEG, GIF, BMP, TIFF. Provide either 'url' or 'urls', not both.

urls : typing.Optional[typing.Sequence[str]]
An array of public URLs to hosted documents. Provide either 'url' or 'urls', not both.
Expand Down