You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> - All extracted text and images are put into the model's context. Make sure you understand the pricing and token usage implications of using PDFs as input.
701
+
>
702
+
> - You can upload up to 100 pages and 32MB of total content in a single request to the API, across multiple file inputs.
703
+
>
704
+
> - Only models that support both text and image inputs, such as `gpt-4o`, `gpt-4o-mini`, or `o1`, can accept PDF files as input.
705
+
>
706
+
> - A `purpose` of `user_data` is currently not supported. As a temporary workaround you will need to set purpose to `assistants`.
707
+
708
+
### Convert PDF to Base64 and analyze
709
+
710
+
711
+
712
+
```python
713
+
import base64
714
+
from openai import AzureOpenAI
715
+
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
"text": "ASK SOME QUESTION RELATED TO UPLOADED PDF"
861
+
}
862
+
]
863
+
}
864
+
]
865
+
}'
866
+
```
867
+
868
+
869
+
697
870
## Using remote MCP servers
698
871
699
872
You can extend the capabilities of your model by connecting it to tools hosted on remote Model Context Protocol (MCP) servers. These servers are maintained by developers and organizations and expose tools that can be accessed by MCP-compatible clients, such as the Responses API.
@@ -963,7 +1136,7 @@ while response.status in {"queued", "in_progress"}:
You can cancel an in-progress background task using the cancel endpoint. Canceling is idempotent—subsequent calls will return the final response object.
1139
+
You can cancel an in-progress background task using the `cancel` endpoint. Canceling is idempotent—subsequent calls will return the final response object.
967
1140
968
1141
```bash
969
1142
curl -X POST https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/responses/resp_1234567890/cancel?api-version=preview \
0 commit comments