Document Intelligence
Initialize
`DocumentIntelligence.Initialize` creates a document-processing job.
Signature
func (c *DocIntelClient) Initialize(ctx context.Context, options ...docIntelOption) (*DocIntelInitializeResponse, error)Options
| Option | Type | Validation |
|---|---|---|
WithLanguage | languages.Code | must be in languages.AllowedDocIntelLanguages |
WithOutputFormat | html|md|json | strict enum |
WithCallback | (url string, authToken *string) | URL must be valid HTTPS |
Valid / invalid combinations
| Combination | Result |
|---|---|
WithCallback("https://example.com/cb", nil) | Valid |
WithCallback("http://example.com/cb", nil) | Validation error |
WithCallback("not-a-url", nil) | Validation error |
Validation rules
- language is optional, but when set must be supported.
- output format is optional, but when set must be one of
html,md,json. - callback URL must be valid and use
https.
Response highlights
| Field | Type |
|---|---|
JobID | string |
StorageContainerType | ContainerType |
JobParameters | JobParameters |
JobState | JobState |
Next step
Call GetUploadLinks.