- •The Create Embeddings action creates a vector representation of an input that machine learning algorithms can easily consume.
You can create a request body with an input field with different data types, such as string or array as shown in the following image:
If the input field must be in string format, you do not need to add additional parameters, as shown in the following request body snippet:
<root>
<input>The food was delicious and the waiter...</input>
<model>text-embedding-3-large</model>
<encoding_format>float</encoding_format>
<dimensions>10</dimensions>
<user>userName</user>
</root>
However, if the input field must be in array format, you need to include additional namespaces as shown in the following request body snippet:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<input m:isArray="true">The food was delicious and the waiter...</input>
<model>text-embedding-3-large</model>
<encoding_format>float</encoding_format>
<dimensions>10</dimensions>
<user>userName</user>
</root>
- •The Create ChatCompletions action creates a completion for the chat message.
You can create a request body with content, tool_choice, and other fields with different data types, such as string or array or string or object, as shown in the following image:
The following snippet is a sample request body with content fields of different types. You do not need to add additional namespaces in the request body.
<root>
<model>gpt-4o</model>
<messages>
<role>system</role>
<content>This is string content field</content>
</messages>
<messages>
<role>user</role>
<content>
<type>text</type>
<text>This is array content field</text>
</content>
</messages>
</root>
You can transfer an image to OpenAI using one of the following options:
- - Use the image link as shown in the following request body example:
<root>
<model>gpt-4-turbo</model>
<messages>
<role>user</role>
<content>
<type>text</type>
<text>What's in this image?</text>
</content>
<content>
<type>image_url</type>
<image_url>
<url>https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg</url>
</image_url>
</content>
</messages>
<max_tokens>300</max_tokens>
</root>
- - Use base64 encoded image data as shown in the following request body example:
<root>
<model>gpt-4-turbo</model>
<messages>
<role>user</role>
<content>
<type>text</type>
<text>What's in this image?</text>
</content>
<content>
<type>image_url</type>
<image_url>
<url>data:image/jpeg;base64,[base64 encode here]</url>
</image_url>
</content>
</messages>
<max_tokens>300</max_tokens>
</root>
- •The Get Models List action gets a list that describes the various models available in the API.
- •The Get Model action retrieves a model instance that provides basic information about the model.
- •The Upload File action uploads a file that can be used with batch actions.
- •The Get Files List action gets a list of uploaded files.
- •The Retrieve File action gets information about a specific file.
- •The Delete file action deletes the specified file.
- •The Retrieve File Content action gets the content of the specified file.
- •The Create Batch action creates and executes a batch from an uploaded file of requests.
- •The Retrieve Batch action gets information about a specific batch.
- •The Cancel Batch action cancels an in-progress batch.
- •The Get Batch List action gets a list of batches.
- •The Create Model Response action creates a single model response.
The following snippet is a sample request body:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<model>gpt-4o-mini</model>
<input>Tell me a three sentence bedtime story about a frendship between Messi and Ronaldo.</input>
<background m:type="xs:boolean">true</background>
</root>
You can also use the MCP server with parameters as shown in the following snippet:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<model>gpt-4o-mini</model>
<input>Add the Blemish Toner Pads to my cart</input>
<temperature m:type="xs:double">0.2</temperature>
<max_output_tokens m:type="xs:int">300</max_output_tokens>
<tools m:isArray="true">
<type>mcp</type>
<server_label>shopify</server_label>
<server_url>https://your-mcp-host.com/mcp</server_url>
<headers>
<Authorization>Bearer YOUR_MCP_SERVER_KEY</Authorization>
</headers>
<allowed_tools m:isArray="true">add_to_cart</allowed_tools>
<allowed_tools m:isArray="true">checkout</allowed_tools>
</tools>
</root>
Create Model Response action returns the unique identifier. For example, resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b.
- •The Get Model Response action accepts the model response ID as input that is generated by the Create Model Response action and returns a single model response.
- •The Delete Model Response action accepts the model response ID as input that is generated by the Create Model Response action, and deletes a model response and returns the deleted status.
- •The Cancel Model Response action accepts the model response ID as input that isgenerated by the Create Model Response action and revokes it.
- •The Get List Items of Response action returns a list of items from the generated model response. It accepts response ID that is generated by the Create Model Response action.
For other types, use parameters as shown in the following snippet:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<field_array m:isArray="true">
<property_1> ...</property_1>
</field_array>
<field_boolean m:type="xs:boolean">true</field_boolean>
<field_double m:type="xs:double">20.2</field_double>
<field_integer m:type="xs:int">10</field_integer>
</root>